adafruit / Adafruit_CircuitPython_BLE

Bluetooth Low Energy (BLE) library for CircuitPython
MIT License
127 stars 58 forks source link

ble_bluefruit_connect_plotter.py should have delay in sending loop #57

Closed dglaude closed 4 years ago

dglaude commented 4 years ago

In the "ble_bluefruit_connect_plotter.py" example, the code is sending sensor data as fast as possible both on the "console" and the BLE UART.

Reading information about Bluefruit LE connect application and the plotter function, I find recommendation of not sending too much/fast data: https://learn.adafruit.com/bluefruit-le-connect/plotter

It might also be wrong to send so much on the "console" and my Mu editor was a bit unresponsive when running that example.

I believe there should be a delay in that loop.

PS: This should be another issue... but to be compatible with Mu editor plotter function, it would be interesting to print a tuple on the console "(x, y)" rather than "x y".