About Bluetooth arduino controller
This app had been developed to allow you to control independently three electronic devices (LEDs) via Bluetooth.
LED1 ON sent “1” , LED1 OFF sent “0”
LED2 ON sent “3” , LED2 OFF sent “2”
LED3 ON sent “5” , LED3 OFF sent “4”
Arduino Code:
#define ledPin7 7
#define ledPin6 6
#define ledPin5 5
int state = 0;
void setup() {
pinMode(ledPin5, OUTPUT);
pinMode(ledPin6, OUTPUT);
pinMode(ledPin7, OUTPUT);
digitalWrite(ledPin5, LOW);
digitalWrite(ledPin6, LOW);
digitalWrite(ledPin7, LOW);
Serial.begin(38400); // Default communication rate of the Bluetooth module
}
void loop() {
if(Serial.available() > 0){ // Checks whether data is comming from the serial port
state = Serial.read(); // Reads the data from the serial port
}
if (state == '0') {
digitalWrite(ledPin5, LOW); // Turn LED OFF
state = 0;
}
else if (state == '1') {
digitalWrite(ledPin5, HIGH); // Turn LED On
state = 0;
}
else if (state == '2') {
digitalWrite(ledPin6, LOW); // Turn LED OFF
state = 0;
}
else if (state == '3') {
digitalWrite(ledPin6, HIGH); // Turn LED On
state = 0;
}
else if (state == '4') {
digitalWrite(ledPin7, LOW); // Turn LED OFF
state = 0;
}
else if (state == '5') {
digitalWrite(ledPin7, HIGH); // Turn LED On
state = 0;
}
}
Download and install
Bluetooth arduino controller version 1.0 on your
Android device!
Downloaded 10+ times, content rating: Everyone
Android package:
com.news2.ambitious.blueotooth, download Bluetooth arduino controller.apk