I generated the code I need using the Blynk Examples generator. I’ve been using the same code with an Arduino 101 for some time, and then switched to an Arduino Mega with an HM-10 Bluetooth module and generated some new code for it. The biggest difference between the two sets of code is that A. they use different libraries and B. in the original I was able to change the display name in the Blynk app that appears from the default of HMSoft to whatever I want. I have tried to duplicate the code and look at other examples, but I can’t seem to figure it out with my new setup. Everything functions fine, I would just like to be able to change that display name like I could before.
Here’s my code currently:
#define BLYNK_PRINT Serial
#include <BlynkSimpleSerialBLE.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
void setup()
{
// Debug console
Serial.begin(9600);
SerialBLE.begin(9600);
Blynk.begin(SerialBLE, auth);
Serial.println("Waiting for connections...");
}
void loop()
{
Blynk.run();
// You can inject your own code or combine it with other sketches.
// Check other examples on how to communicate with Blynk. Remember
// to avoid delay() function!
}