I am attempting to make a display that shows the status of a BLE device, using a Pixel.JS.
The BLE device is a relay working much like an eggtimer.
In the advertisement package the timer value is included.
So the display just needs to listen to the advertisements, filter out the right device, and show this value on the screen.
Add in a menu for the use to select the device to show.
I have been over this for a week now and as soon as I put it all together I quickly get "Execution Interrupted" and "New interpreter error: MEMORY" along with some more messages.
The idéa is based on the example for the Pixel.JS
I have attached the current version of the code.
This does not print the values on the display yet, I simple connect over BLE and run consol.log(macs,TimerValue) to view what the current collected values are.
I have done several version of this.
This one only uses NRF.findDevices with a filter for manufacturer 0xFFFF, as that is what this device advertises as at this stage.
I have also tried making a variant uset NRF.setScan() with simmilar filters, where I exit as soon as one advertisement packets has arrived, then wait 30s before doing this again.
The result is the same.
I have also tried running this by "download to ram", "download to flash" and changing things to use save() to free up more ram.
The result is the same.
After a short while, say 2-3minutes, the device is gone and out of memory.
When I tested the Pixel.js example I could get the "same" problem. The example updates the display every 60s. Setting the update to say 10s would make that example fail to.
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.
Hi
I am attempting to make a display that shows the status of a BLE device, using a Pixel.JS.
The BLE device is a relay working much like an eggtimer.
In the advertisement package the timer value is included.
So the display just needs to listen to the advertisements, filter out the right device, and show this value on the screen.
Add in a menu for the use to select the device to show.
I have been over this for a week now and as soon as I put it all together I quickly get "Execution Interrupted" and "New interpreter error: MEMORY" along with some more messages.
The idéa is based on the example for the Pixel.JS
I have attached the current version of the code.
This does not print the values on the display yet, I simple connect over BLE and run consol.log(macs,TimerValue) to view what the current collected values are.
I have done several version of this.
This one only uses NRF.findDevices with a filter for manufacturer 0xFFFF, as that is what this device advertises as at this stage.
I have also tried making a variant uset NRF.setScan() with simmilar filters, where I exit as soon as one advertisement packets has arrived, then wait 30s before doing this again.
The result is the same.
I have also tried running this by "download to ram", "download to flash" and changing things to use save() to free up more ram.
The result is the same.
After a short while, say 2-3minutes, the device is gone and out of memory.
When I tested the Pixel.js example I could get the "same" problem. The example updates the display every 60s. Setting the update to say 10s would make that example fail to.
Any help or comments would be appreciated.
/J
1 Attachment