Describe the bug
Certain Makecode event blocks cause bootloop on ESP32 device with UF2. This issue occurs with the rotary encoder, light sensor, slider/potentiometer, or any other sensor but not for button events (down/hold/up).
Copy the uf2 to ESP32 device, ours is a prototype device but similar to the MSR ESP32-S2 based IoT brain
Issues arise at this point
a. If the rotary encoder is connected to the brain, nothing gets logged to console, and the device enters a boot loop.
b. If the rotary encoder isn't connected to a jd connector, the console will show the heartbeat pulse and "binding 1 servers".
c. Connecting the module after b) will trigger the "rotated" console message under the event block and then put the device into a boot loop like in a)
Expected behaviorDemo code blocks for Microbit
The same blocks in the microbit editor (including photodiodes, sliders/pots, etc) will act normally. It will log "pulse" every 200ms and "rotate" every time the encoder rotates.
Additional context
Just having the event block seems to be enough to trigger the boot loop, the blocks inside of it are irrelevant.
Getters don't cause this issue. This code and it's block equivalent works as expected.
Comparing the packets sent in the jacdac dashboard, the button events (which do work) are a flag 8000 "CMD_EVENT_MASK"; while the encoder, slider, and light sensor are all emitting 1000 flagged "GET_REG" when their value changes.
This conversation started in an email with Tom Ball
Describe the bug Certain Makecode event blocks cause bootloop on ESP32 device with UF2. This issue occurs with the rotary encoder, light sensor, slider/potentiometer, or any other sensor but not for button events (down/hold/up).
To Reproduce Demo code blocks in maker.makecode.com
Expected behavior Demo code blocks for Microbit The same blocks in the microbit editor (including photodiodes, sliders/pots, etc) will act normally. It will log "pulse" every 200ms and "rotate" every time the encoder rotates.
Additional context Just having the event block seems to be enough to trigger the boot loop, the blocks inside of it are irrelevant.
Getters don't cause this issue. This code and it's block equivalent works as expected.
Comparing the packets sent in the jacdac dashboard, the button events (which do work) are a flag 8000 "CMD_EVENT_MASK"; while the encoder, slider, and light sensor are all emitting 1000 flagged "GET_REG" when their value changes.
This conversation started in an email with Tom Ball