Is there a limit to the use of when block hats with Microblocks ?
Issue #412
resolved
I would like to use IR controler with MB,
I refer to the tutorial , and design a program which is shown as below.
But it seems that there is a limit to the use of when block hats,only nine of them can be activated when press START.
Comments (3)
-
repo owner -
reporter OK. I got it.Thanks.
-
repo owner - changed status to resolved
- Log in to comment
Yes, that is correct. Each "when" hat runs as a task and each task requires a certain amount of RAM for stack space so there is a limit of 10 total tasks. (Your "when started hat" is also a task.)
It is the same limit on all of the boards that MicroBlocks supports, even though some boards have more RAM than others. That makes MicroBlocks code more portable.
In this case, I would probably combine all the IR code scripts into a single script that receives an IR code and stores it in a variable, then uses a IF statement decide what to do based on the code received.
Hope that helps!