Environmental data not working after flashing Ruuvitag #7241
Replies: 1 comment
-
Posted at 2017-07-04 by @gfwilliams Hi, It's because the sensors on the Ruuvitag need to be initialised at power on - and basically your code is initialising them once (at upload). If you do:
Then the (also, just moved this to the 'other boards' section) Posted at 2017-07-04 by jamesh Hi Gordon, Thanks for the reply (and apologies for not putting this in the right place, wasn't sure where the best place to put it was). Well I did find this thread and as a result I actually already tried the approach you've suggested but to no avail. The only difference in the other thread is they've got pretty much all the code in
I will try with exactly the sample you've suggested if you think it would make the difference, however, failing that do you have any other ideas? From the looks of the other thread it seems like it's a limitation from the Ruuvi side? Posted at 2017-07-04 by @gfwilliams I don't think the two styles should make too much difference. You're right though - I just looked at the module, and I made a mistake when making it in the first place, which means that the initialisation occurs at upload time in each case! I've just modified it, so if you upload again hopefully it'll work now (not with your first code, but with the second one). Please can you try and let me know? I also updated the documentation to mention it. Posted at 2017-07-04 by jamesh @gfwilliams brilliant :) I'll give it a try tonight and let you know how I get on. Thanks Posted at 2017-07-05 by jamesh @gfwilliams worked a treat, thanks! I'm intrigued, how did you apply the fix without me having to update Espruino 🤔 When the tag is flashed are the libs downloaded in the fly? Posted at 2017-07-06 by @gfwilliams Yes - the Espruino firmware's got some libraries built in, but if you use Posted at 2017-08-15 by Jens Hey everybody, I tried your example but it doesn't work.
After restarting the ruuvi I get this message: in function called from system in function "getEnvData" called from line 5 col 33 What could be the problem? Posted at 2017-08-15 by @gfwilliams Hmm, that's an interesting problem actually. This should work:
or this should work:
but it's to do with the order of execution on initialisation, where Posted at 2017-08-15 by Jens Yes it works ;) thank you Posted at 2018-09-08 by cesmes Hmm, for some reason none of the above are working through the web IDE on firmwares 1v95-1v99. Everytime I get What could be wrong? Posted at 2018-09-11 by ojousima @user93898 @gfwilliams Any idea about what could have changed on IDE or backend? Exact same code that worked on exact same tag with the same firmware 2 days ago gives the above error. I've tested the code on IDE 0.70.2, 0.70.3 and Espruino 1.99 today. Posted at 2018-09-12 by @gfwilliams Looks like there's a post about this particular problem here as well, so to avoid duplication can we discuss it there? http://forum.espruino.com/conversations/325434 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-07-03 by jamesh
Got some odd behaviour trying to advertise some environmental data from a Ruuvi tag using Espruino. In a nut shell, flashing via web IDE and outputting env data works perfectly fine however as soon as I persist the firmware on the board the readings seem to skew and not change.
Can be reproduced with very minimum code e.g.
Any ideas what's going on?
Beta Was this translation helpful? Give feedback.
All reactions