Table Of Contents
Latest update [menu]
Version 1.0 updated.
Description [menu]
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 install Arduino 4 Relay Bluetooth APK for Android [menu]
Download Arduino 4 Relay Bluetooth APK file (appinventor.ai_andjan1964.Arduino_4_Relays_1_2503960.apk) from SameAPK.com, then follow these steps:
Update Phone Settings
- Go to your phone Settings page
- Tap Security or Applications (varies with device)
- Check the Unknown Sources box
- Confirm with OK
Go to Downloads
- Open Downloads on your device by going to My Files or Files
- Tap the APK file you downloaded (appinventor.ai_andjan1964.Arduino_4_Relays_1_2503960.apk)
- Tap Install when prompted, the APK file you downloaded will be installed on your device.
How to install Arduino 4 Relay Bluetooth APK on Windows 7/8/10 or MAC PC? [menu]
Download Arduino 4 Relay Bluetooth APK file(appinventor.ai_andjan1964.Arduino_4_Relays_1_2503960.apk) from SameAPK.com to your PC (ex: /Users/xxx/Downloads/(appinventor.ai_andjan1964.Arduino_4_Relays_1_2503960.apk)), then follow these steps:
Using Emulator:
- Download And Install one Emulator Softwares (Ex: Bluestacks, GenyMotion, NoxPlayer)
- Simple install APK on PC by drag and drop file appinventor.ai_andjan1964.Arduino_4_Relays_1_2503960.apk on Emulator screen
Arduino 4 Relay Bluetooth APK Pros & Cons [menu]
Pros
- This app is safe, it's not require high risk permissions
- Compatible with 32 bit device (most Emulator using 32bit arch CPU)
- Compatible with 64-bit device (some android device and current Bluestacks)
Cons
Everything is good.