It's strange - it doesn't appear well for me either - but when dumping the raw advertising data received I do see the 2 types of advertising packet being sent as they should be. If Scan Response works then that's probably best then.
I still cannot understand though how you can represent, lets say 1000 states, with 255 numbers.
You're right, you can't :) It's basically just turning 1000 states into 256 states, but the light measurement isn't accurate enough that it really matters. You could always use 2 bytes for 16 bits (DataView is good for that).
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.
It's strange - it doesn't appear well for me either - but when dumping the raw advertising data received I do see the 2 types of advertising packet being sent as they should be. If Scan Response works then that's probably best then.
You're right, you can't :) It's basically just turning 1000 states into 256 states, but the light measurement isn't accurate enough that it really matters. You could always use 2 bytes for 16 bits (
DataView
is good for that).