I recently ordered an HC-06 Bluetooth module for my Arduino Uno, and after watching this video, and many others, I still have been having many issues figuring out how to get it to work, and some questions for how the code receives and reads serial data from my phone.
I assume this wiring is correct, right?
- Rx > Tx
- Tx > Rx
- Gnd > Gnd
- Vcc > 3.3V
When I sent a command over the Bluetooth terminal app I have, the serial monitor displays that command over and over, I assume that is correct also?
How do I read the serial input? I've been using
if(Serial.available() > 0) phoneInput = (char) Serial.read();
and then displaying the value of phoneInput to the serial monitor, but for some reason I can't seem to have it control anything properly (in this case an LED)
What datatype is the Serial.read() returning to my variable before I cast char on to it?
I get errors uploading the code to the board (avrdude: stk500_recv(): programmer is not responding), until I remove the pin connected to the Rx on the arduino, is there a cleaner solution to uploading the board without unplugging wires?