I try to connect my arduino uno with a HM-10 bluetooth shield. I using the example code but there is always shown a login timeout. Please can you help me?
Code #define BLYNK_DEBUG #define BLYNK_PRINT Serial
#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "fa73e531ja4e4149a48j55f9cdf695a62";
SoftwareSerial SerialBLE(10, 11); // RX, TX
void setup()
{
// Debug console
Serial.begin(9600);
SerialBLE.begin(9600);
Blynk.begin(SerialBLE, auth);
Serial.println("Waiting for connections...");
}
void loop()
{
Blynk.run();
}
Serial Log:
[0]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
///_, /////_
/__/ v0.4.3 on Arduino Uno
can you find the module in the app with ble widget? it can connect?
does your phone has internet connection?
is the ble module is hooked up correctly to the arduino? module tx goes to arduino rx, and module rx goes to arduino tx pin, respectively the gnd has to be common.
also - i’m not sure if it matters in this case - but always good practice to keep the order of #includes. you have:
the hm10 has a status led. it shows a steady connected status after pairing?
first of all, you have to have a steady pairing with the module, even without running any sketch on the arduino. you can verify this looking at the status led on the module, and also in the app ble widget. until you do not have this stable, it does not matter what sketch is running on the arduino, or even if the serial cables are connected or not.
are you sure the baud rate is 9600?
if you have a multimeter, please check the jumper cables for continuity, then hook up this way:
hm10 tx -> arduino pin0 (rx)
hm10 rx -> arduino pin1 (tx)
create a value display in your project @ virtual pin v0, set to push, and try to run this sketch:
It seames the bluetooth widget doesn’t work for iPhone yet. The pairing doesn’t work. Also in the widget information stands that it only work with Android. I tried to connect with another app (LightBlue) and it works directly. I like to work with blynk, so I hope that support come soon.
@vshymanskyy, could you please include that ble is currently not compatible with iphone, also in the built in ble example in arduino ide?
i think most people read the comments in the example code, not in the app, when experimenting with new code.
from the current description, i would not think that ble it is not supported on iphone:
/**************************************************************
* Blynk is a platform with iOS and Android apps to control
* Arduino, Raspberry Pi and the likes over the Internet.
…
* This example shows how to use Serial BLE modules (HM-10, HC-08)
* to connect your project to Blynk.