I just want the device to advertise like here ... working as an "AirTag". From what I understand this code not really loops it just sets the device in advertising mode. How much will it consume? Is there something I can disable to even lower the consumption?
Advertising, 2000ms 0dBm (nonconnectable, nonscannable) - under 10uA
If you make it nonconnectable, nonscannable then make sure you have some recovery method to connect to it to change code, holding BTN1 for >3 seconds at power on should skip any code starting automatically from flash
Thank you @fanoush!
When I use setTimeout to regularly change the BLE advertising (once a day or so), it will surely increase power consumption a bit. But will it lead to the interpreter running permanently wasting power or will it use (deep)sleep to minimise consumption? I have read here that nRF52 boards sleep automatically ...?
Yes, it'll just sleep automatically - if you change advertising data even once a minute, the increased power usage is pretty negligible so I wouldn't worry about it.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem