/*
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
#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
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
}
}
We do not host Arduino 4 Relay Bluetooth on our servers. We did not scan it for viruses, adware, spyware or other type of malware. This app is hosted by Galad and passed their terms and conditions to be listed there. We recommend caution when installing it.
The APK Download link for Arduino 4 Relay Bluetooth is provided to you by apps112.com without any warranties, representations or guarantees of any kind, so access it at your own risk.
If you have questions regarding this particular app contact the publisher directly. For questions about the functionalities of apps112.com contact us.
| ||||
Downloads: 174 | ||||
Updated At: 2024-04-23 10:06:56 | ||||
Publisher: Jan Erik Andresen / Andronesen-flyfoto.com | ||||
Operating System: Android | ||||
License Type: Free |