I couldn't resist fiddling about.
V4
I've
- Put an array ("list") of messages in the scroller code
- Press A+B to select the next message, or back to the start of the message list if already at the last
- Set a "changeMsg" flag in the A+B pressed and the "receive name value" blocks
- Put the message switching code into a function, called switchMsg
- Check the "changeMsg" flag in the main forever loop; if it's set, then invoke the message switch function
- Any microbit can be used to switch message
- Enabled MBs to switch message before they are configured with an ID - this required an additional "configured" flag, distinct from the "readyToGo" display control flag
I think the use of a very small "receive name value" block to set the "changeMsg" flag has made it a lot more responsive. In addition, putting the switchMsg code in the main processing line has made the switch more responsive, there's no lag where the main processing is still running while the message is changing.
![]() |
| Initialisation |
![]() |
| Main loop - only really works for ID = 0 |
![]() |
| Code for ID > 0 - character index code needs tidying! |
![]() |
| Button and change message signal processing |
In addition, I've created a MessageSwitcher, which independently sends a new message index, using A and B buttons to increment/decrement the index to send. Hurray!





No comments:
Post a Comment