Arduino 4 Relay Bluetooth

Arduino 4 Relay Bluetooth Free App

Rated 4.53/5 (19) —  Free Android application by Jan Erik Andresen / Andronesen-flyfoto.com

Advertisements

About Arduino 4 Relay Bluetooth

CODE:

/*
Relay IN1 connected to PinOut 2 Arduino
Relay IN2 connected to PinOut 3 Arduino
Relay IN3 connected to PinOut 4 Arduino
Relay IN4 connected to PinOut 5 Arduino
--->you can connected to relay modul 4 channel

Serial data sending from Arduino 4 Relay.apk
data '1'-'4' to on is Ralay CH 1-4
data 'A'-'D' to off is Ralay CH 1-4
data '9' to on ALL CH 1-4
data 'I' to off ALL CH 1-4
*/

#include
SoftwareSerial mySerial(10, 11); //Pin10 RX , Pin 11 TX connected to--> Bluetooth TX,RX

#define relay1 2
#define relay2 3
#define relay3 4
#define relay4 5

char val;
void setup() {
pinMode(relay1,OUTPUT);
pinMode(relay2,OUTPUT);
pinMode(relay3,OUTPUT);
pinMode(relay4,OUTPUT);
digitalWrite(relay1,LOW);//H
digitalWrite(relay2,LOW);//H
digitalWrite(relay3,LOW);//H
digitalWrite(relay4,LOW);//H
mySerial.begin(9600);
Serial.begin(9600);
}

void loop() {
//chek data serial from bluetooth android App
if( mySerial.available() >0 ) {
val = mySerial.read();
Serial.println(val);
}
//Relay is on
if( val == '1' ) {
digitalWrite(relay1,HIGH); }//L
else if( val == '2' ) {
digitalWrite(relay2,HIGH); }//L
else if( val == '3' ) {
digitalWrite(relay3,HIGH); }//L
else if( val == '4' ) {
digitalWrite(relay4,HIGH); }//L
//relay all on
else if( val == '9' ) {
digitalWrite(relay1,HIGH);//L
digitalWrite(relay2,HIGH);//L
digitalWrite(relay3,HIGH);//L
digitalWrite(relay4,HIGH);//L
}
//relay is off
else if( val == 'A' ) {
digitalWrite(relay1,LOW); }//H
else if( val == 'B' ) {
digitalWrite(relay2,LOW); }//H
else if( val == 'C' ) {
digitalWrite(relay3,LOW); }//H
else if( val == 'D' ) {
digitalWrite(relay4,LOW); }//H
//relay all off
else if( val == 'I' ) {
digitalWrite(relay1,LOW);//H
digitalWrite(relay2,LOW);//H
digitalWrite(relay3,LOW);//H
digitalWrite(relay4,LOW);//H
}

}

How to Download / Install

Download and install Arduino 4 Relay Bluetooth version 1.0 on your Android device!
Downloaded 1,000+ times, content rating: Everyone
Android package: appinventor.ai_andjan1964.Arduino_4_Relays, download Arduino 4 Relay Bluetooth.apk

All Application Badges

Free
downl.
Android
1.6+
For everyone
Android app

App History & Updates

More downloads  Arduino 4 Relay Bluetooth reached 1 000 - 5 000 downloads

What are users saying about Arduino 4 Relay Bluetooth

S70%
by S####:

This worked flawlessly with the HC-05 BT and exactly what I needed for my project! Just a note, the relay board I have works backwards. If the digitalWrite is "LOW" the relay(accessory) will be "ON." And if digitalWrite is "HIGH" it will be "OFF." So I just had to change everything in my code from LOW to HIGH and vise versa. Also I wrote the code before I downloaded this particular app and realized the serial command is case sensitive. "A"-"D"and "I" need to be capitalized to work. These were the minor issues I ran into, but had nothing to do with this app.

S70%
by S####:

Can any one plss provie circuit diagram for this project

J70%
by J####:

This is really working. Thank you for the code and app


Share The Word!


Rating Distribution

RATING
4.55
19 users

5

4

3

2

1