-
• #2
Hi - I see you closed this. Was it because you found the problem?
Ideally you would call
setServices
once but it may not be a problem.It is possible that you're calling
midisend
too often though, and that is what is causing the problem? -
• #3
Hi Gordon,
I closed it because I realized it was a stupid mistake on my end ::)if you look closely , the midi send part isn't inside Puck.on('accel',function(a) {}
The code was working but I was just never calling that part¯_(ツ)_/¯
The if (active) statement is also completely useless ...This being said, using ble midi, needs the device to restart after uploading the code, meaning I need to flash vs ram. I noticed that after a few different uploads the device will start to act oddly ( aka bits of older code will still be there but merged with the new ones?)
In this case what is the best approach to avoid this or start fresh? hard reset? reset() + save() ?
thank you! -
• #4
I noticed that after a few different uploads the device will start to act oddly ( aka bits of older code will still be there but merged with the new ones?)
That'd odd - I guess maybe you had managed to save to flash so it runs all the time - but that's a bit dangerous so it's buried in the settings, or maybe you wrote to
.boot0
or similar - this might help: https://www.espruino.com/SavingWriting to certain files means that you can have code that runs all the time, even after a reset.
However
require("Storage").eraseAll();reset()
will clear everything out and refresh the device making it completely clean, whatever came before :)
hi,
I am trying to send midi cc only on motion detection, but I get nothing coming and the terminl issue me an error: WARNING: SD ERR 0x11 (BUSY) (:835)
I am using require("puckjsv2-accel-movement").on(); and suspect I am using setservices twice then which could be the problem? but not really sure where to look at.
here is the code: