I have 5 Pucks advertising at the same time, with one set to advertise every 50ms.
When I upload that code, the console just gets spammed with JSON from the advertising and it's hard to do anything, which is kind of what you'd expect. Realistically the RSSI values move around a bit so almost every advertising packet is different and it ends up printing data faster than it can output it over Bluetooth.
However, if I remove the Bluetooth.println(JSON.stringify(device)); and just type devices to look at the active devices then it looks like it's working pretty well. It's been going a few minutes now but I'll leave it longer just to make sure.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I have 5 Pucks advertising at the same time, with one set to advertise every 50ms.
When I upload that code, the console just gets spammed with JSON from the advertising and it's hard to do anything, which is kind of what you'd expect. Realistically the RSSI values move around a bit so almost every advertising packet is different and it ends up printing data faster than it can output it over Bluetooth.
However, if I remove the
Bluetooth.println(JSON.stringify(device));
and just typedevices
to look at the active devices then it looks like it's working pretty well. It's been going a few minutes now but I'll leave it longer just to make sure.