Unable to use the forever block on custom device


Hello, I have to do a custom device on mBlock 5, the device I’m creating is based on Arduino nano.

I have the “init” event for when the the device starts, like what exemplified on https://www.mblock.cc/doc/en/developer-documentation/tutorials/add-arduino.html .

Every block I create for the device seems to work fine. However the forever block (according to the side bar where it shows the code generated for the blocks I on the mblock Web app) never has any code generated for it or for any of the block inside it!

Even trying to change current blocks or trying to create a new block to copy the forever block doesn’t work.

Changing the current blocks to copy the code on the “code” field to the “loop” field doesn’t help due to the way that the “loop” field works.

Also, creating a “Repeat Forver” block with a “code” of

while(1) {

also doesn’t have the expected result.

Could I get some with that?



you just need to change BRANCH to BRANCH1,
BRANCH is all codes next to Hat block(first), and BRANCH1 is codes inside C block


So far it seems to work, I will test a bit later this week to check if it does really work on the actual device.