Puck NRF sleep #2209
Replies: 2 comments
-
Posted at 2017-05-12 by @gfwilliams Do you have an up to date firmware like 1v92? All 3 LEDs turning on at once is a sign of an unreported error from the Nordic Bluetooth stack, so it's not specifically anything you're doing. If it is 1v92 with the problem and it can be reproduced with just the above code I'll definitely take a look at fixing it - however I'm on holiday next week so it won't get done for a while. In the mean time, it's not using that much power by advertising - and you can always reduce the advertising interval with |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-05-12 by user76916 Ah ok. Cool. Yes I do have the latest firmware as you mention. Happy holidays ! PS - Great work :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-05-12 by user76916
I have an application where the Puck sends data through BLE write on another device.
To reduce power consumption even more, I tried turning off NRF by NRF.sleep() (The example here works https://github.com/espruino/EspruinoDocs/blob/master/puck/Puck.js%20Security.md#disable-bluetooth)
However, when I modify the code to enable sleep after performing some action, the Puck lights up all 3 LEDs and my function does not work again. Here is a sample pseudo code -
var locked = 0;
setWatch(function(){
NRF.wake();
digitalPulse(LED2, 1, 50);
/*
do something here
*/
setTimeout(() => NRF.sleep(), 1000); // turns on all 3 LEDs briefly and resets.
}, BTN, {repeat:true, edge:"rising", debounce:50});
Any suggestions why is this happening ?
Beta Was this translation helpful? Give feedback.
All reactions