I’m trying to use Blynk with my setup - Arduino Mega via Bluetooth HC-05 module.
I ran the sample Blynk Blink program, connected to the module through the Bluetooth settings in my Pixel XL phone, then put a Bluetooth module block with the paired device in the Blynk app. In the Arduino serial, I can only get following -
First off, I would recommend getting your Mega <–> BT module link tested with some other diagram & example from the internet first. The example sketch in the Sketch Builder is not taking proper advantage of the Mega’s multi-serial capacity.
I figured out what was causing the login timeout issue -
According to the sample code from Blynk Example Browser,
SoftwareSerial SerialBLE(10, 11); // RX, TX
Which implies-
Bluetooth Module RX -> Pin 10
Bluetooth Module TX -> Pin 11
However it should be
Bluetooth Module RX -> Pin 11
Bluetooth Module TX -> Pin 10
I confirmed this multiple times! I’m not sure if it was my knockoff Arduino or cheapo Bluetooth module, but if you are having this issue, try flipping the wire layouts!
Not quite … this actually indicates the Arduino’s RX & TX pins… which, for a serial link, go to their opposing pins of the BT or other serial device… Think from mouth (Arduino TX) to ear (BT RX) and vice versa.
And with the Mega, it is still best to use the 2nd hardware serial pins (Serial1) than any software serial option.