Arduino-HardwareBLESerial icon indicating copy to clipboard operation
Arduino-HardwareBLESerial copied to clipboard

Problem sending numbers uint64_t

Open Lollum89 opened this issue 3 years ago • 2 comments

Thank you for the excellent code! BLE on arduino can be such a a hassle, this makes it better. I am having some issues sending numbers. In particular I am using uint_64. To replicate the error it should be enough to insert at any point bleSerial.println((uint64_t)millis()); I used the provided echo example and inserted it after the print line. What I see on the console is lu, regardless of the value. I am using Bluefruit Connect on iOS. The board is Arduino MKR 1010WiFi.

I solved using: char buffer[20]; sprintf(buffer,"%d",millis()); bleSerial.println(buffer);

Lollum89 avatar Oct 26 '22 17:10 Lollum89

Have the same problem, wanted to send an int i, did this for the fix: char iChar = String(i)[0]; bleSerial.print(iChar)

YK12321 avatar Apr 22 '23 14:04 YK12321

Have the same problem, wanted to send an int i, did this for the fix: char iChar = String(i)[0]; bleSerial.print(iChar);

YK12321 avatar Apr 22 '23 14:04 YK12321