BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Printing Device name to a labeled value display?

I am using an ESP32 with connection over bluetooth. I would like to print the device name to a labeled value display. Is this possible? I could also just have the device name be set as a string and print the string but I don’t think the Blynk.setDeviceName(“Bracelet01”); line allows a string in place of the “Bracelet01”. Is there a way to print the device name to the serial port possibly and read it from there into a labeled value display?
The text below is how I set the device name. I am using the Arduino IDE.

void setup()

{
  // Debug console
  Serial.begin(9600);

  Serial.println("Waiting for connections...");

  Blynk.setDeviceName("Bracelet01");
  
  Blynk.begin(auth);

  timer.setInterval(5000L, sendValue);

  //pinMode(LED, OUTPUT);
  //pixels.begin();
  strip.begin(); //start neopixels
  strip.show(); //set all to 'off'
}

@brennanj please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly. Triple backticks look like this:
```

Pete.

2 Likes

Without looking at the library, I’d guess that Blynk.setDeviceName() is expecting a char variable type, so something like…

char devicename[] = "Bracelet01";
Blynk.setDeviceName(devicename);

is more likely to work.

Pete.

Thank you Pete that worked!

1 Like