Bluetooth serial communication issue between Arduino and Android -
i have written application android in java using eclipse send data arduino via bluetooth.
the devices seem connected okay, when send data android arduino receive (rx) light on arduino board doesn't light up.
can help?
#define arduinorx 2 #define arduinotx 3 int gelen_veri; int ledcikis = 8; softwareserial bluetooth(arduinorx, arduinotx); void setup() { bluetooth.begin(9600); } void loop() { if (bluetooth.available() > 0) { gelen_veri=bluetooth.read(); switch (gelen_veri) { case 'a' : digitalwrite(ledcikis, high); break; case 'k' : digitalwrite(ledcikis, low); break; default: break; } } }
use serial rx/tx pins instead of softwareserial. i've had problems softwareserial in past , hc-05 bluetooth module.
Comments
Post a Comment