Arduino Bluetooth Controller - Control Automation its Bluetooth - Arduino more (relay with up to 16 channels). Compatible with your Bluetooth Automation controlled with your Arduino, and with support for up to 16 modules Relay Outputs!
APPLICATION FUNCTIONS
OBS .: For the application running on your device must be Paired with your Bluetooth module.
1st Permit request to turn on the Bluetooth Device.
2nd connection with your Bluetooth Module HC-05, HC-06 and ETC.
Sending Characters to 3rd till 16 drive relays.
4th Informative visual if the button is OFF or ON.
Example follows the Arduino code for the same operation! The code can be changed to your preference or use your own code, (keeping) the characters that is being sent by each button in the correct order! Only change really know what's doing!
CODE Arduino - COMPILE CODE BEFORE MAKING THE CONNECTION OF WIRES
// Below the analog ports were set to Digital
#define A0 14
#define A1 15
#define A2 16
#define A3 17
void setup ()
{
Serial.begin (9600);
// Below the doors are activated either by phone, via Bluetooth! All Starts Disconnected
pinMode (2, OUTPUT);
digitalWrite (2, HIGH);
pinMode (3, OUTPUT);
digitalWrite (3, HIGH);
pinMode (4, OUTPUT);
digitalWrite (4, HIGH);
pinMode (5, OUTPUT);
digitalWrite (5, HIGH);
pinMode (6, OUTPUT);
digitalWrite (6, HIGH);
pinMode (7, OUTPUT);
digitalWrite (7, HIGH);
pinMode (8, OUTPUT);
digitalWrite (8, HIGH);
pinMode (9, OUTPUT);
digitalWrite (9, HIGH);
pinMode (10, OUTPUT);
digitalWrite (10, HIGH);
pinMode (11, OUTPUT);
digitalWrite (11, HIGH);
pinMode (12, OUTPUT);
digitalWrite (12, HIGH);
pinMode (13, OUTPUT);
digitalWrite (13, HIGH);
pinMode (A0, OUTPUT);
digitalWrite (A0, HIGH);
pinMode (A1, OUTPUT);
digitalWrite (A1, HIGH);
pinMode (A2 OUTPUT);
digitalWrite (A2, HIGH);
pinMode (A3 OUTPUT);
digitalWrite (A3, HIGH);
}
void loop ()
{
if (Serial.available ())
{
int key Serial.read = ();
Serial.read int val = ();
// digitalWrite (key, val);
if (key == 'A') {
digitalWrite (2, HIGH);
}
else if (key == 'a')
{
digitalWrite (2, LOW);
}
if (key == 'B') {
digitalWrite (3, HIGH);
}
else if (key == 'b')
{
digitalWrite (3, LOW);
}
if (key == 'C') {
digitalWrite (4, HIGH);
}
else if (key == 'c')
{
digitalWrite (4, LOW);
}
if (key == 'd') {
digitalWrite (5, HIGH);
}
else if (key == 'd')
{
digitalWrite (5, LOW);
}
if (key == 'E') {
digitalWrite (6, HIGH);
}
else if (key == 'e')
{
digitalWrite (6, LOW);
}
if (key == 'F') {
digitalWrite (7, HIGH);
}
else if (key == 'f')
{
digitalWrite (7, LOW);
}
if (key == 'G') {
digitalWrite (8, HIGH);
}
else if (key == 'g')
{
digitalWrite (8, LOW);
}
if (key == 'H') {
digitalWrite (9, HIGH);
}
else if (key == 'h')
{
digitalWrite (9, LOW);
}
if (key == 'I') {
digitalWrite (10, HIGH);
}
else if (key == 'I')
{
digitalWrite (10, LOW);
}
if (key == 'J') {
digitalWrite (11, HIGH);
}
else if (key == 'j')
{
digitalWrite (11, LOW);
}
if (key == 'K') {
digitalWrite (12, HIGH);
}
else if (key == 'k')
{
digitalWrite (12, LOW);
}
if (key == 'L') {
digitalWrite (13, HIGH);
}
else if (key == 'l')
{
digitalWrite (13, LOW);
}
if (key == 'm') {
digitalWrite (A0, HIGH);
}
else if (key == 'm')
{
digitalWrite (A0, LOW);
}
if (key == 'C') {
digitalWrite (A1, HIGH);
}
else if (key == 'n')
{
digitalWrite (A1, LOW);
}
if (key == 'O') {
digitalWrite (A2, HIGH);
}
else if (key == 'o')
{
digitalWrite (A2, LOW);
}
if (key == 'P') {
digitalWrite (A3, HIGH);
}
else if (key == 'p')
{
digitalWrite (A3, LOW);
}
delay (10);
}
}