-
-
-
@MaBe, thanks for the code, looks interesting! However it does not work for me, I tried for example the nRFToolbox on an iPhone. That does not display the data. Can you tell which application you used to read the data?
Also, my understanding is that to read that data you would have to connect. I am probably misunderstanding this but as a beacon I would use setAdvertise. Something like this:
setInterval(function() { NRF.setAdvertising({ 0x1809 : [Math.round(E.getTemperature())] }); }, 1000);
(directly from the tutorial). Then I can see the data directly in nRF Connect without even connecting.
Thanks!
-
-
Hi @Gordon,
I tried building the Espruino firmware for the Puck myself. I am doing it from a Mac, checked out the top of the master from github.
I started the build with
PUCKJS=1 RELEASE=1 make
Building works mostly, lots of warnings, but no apparent errors. I get to the stage where it links the firmware. That seems to work. Then it fails with the following log:
GEN espruino_1v90.1890_puckjs.hex Merging SoftDevice and Bootloader # nrfutil settings generate --family NRF52 --application espruino_1v90.1890_puckjs.hex --application-version 0xff --bootloader-version 0xff --bl-settings-version 1 dfu_settings.hex FIXME - had to set --overlap=replace python scripts/hexmerge.py --overlap=replace /Users/stevie/Desktop/github/Espruino/targetlibs/nrf5x/components/softdevice/s132/hex/s132_nrf52_3.0.0_softdevice.hex bootloader_espruino_1v90.1890_puckjs.hex espruino_1v90.1890_puckjs.hex -o tmp.hex Traceback (most recent call last): File "scripts/hexmerge.py", line 178, in <module> sys.exit(main()) File "scripts/hexmerge.py", line 158, in main ih = intelhex.IntelHex(fname) File "/Users/stevie/Desktop/github/Espruino/scripts/intelhex/__init__.py", line 93, in __init__ self.loadhex(source) File "/Users/stevie/Desktop/github/Espruino/scripts/intelhex/__init__.py", line 202, in loadhex fobj = open(fobj, "r") IOError: [Errno 2] No such file or directory: 'bootloader_espruino_1v90.1890_puckjs.hex'
Any advise? What am I doing wrong?
Thanks!
-
Did you use it before and maybe flash something different? If yes, then remove the battery and press the button. Then put in the battery again and within 3 seconds release the button. Then it would omit any program you may have on the puck.
Otherwise I would try re-installing the firmware. The procedure is documentation in the getting started.
-
-
-
Hi @ChristianW, one idea would be to advertise the installed version number. So when scanning, the sender would skip the pucks which have the same or a higher version number. That's not completely fool proof, when two pucks are sending at the same time with different versions, the older version could in theory win. But it's better than nothing...
-
-
-
You could type reset(); save();
If you want a reboot command always available, just do:
E.setBootCode("function reboot() { reset(); save(); }");
That would do the trick for you. It would also be in memory after you reset or saved something.
BTW: I would not necessarily name that reboot. After all if you reboot a computer it does not wipe the harddisk :-).
-
Hi @Frida, what would be the difference to reset()?
-
Hi @Gordon, thanks for putting the enhancement to the NRF.sleep() in so fast. I tested the new version and it works great, now! I also did the measurement with the scope. But as expected the accuracy is not really good enough to say anything conclusive. But at least I did not see this weird fluctuation anymore. So all seems to be good.
Oops, apparently I have 2 accounts :-)
Okay, I have uploaded the new firmware to the Puck and can confirm that it works fine. Thanks a lot!