In this folder, you will find various useful blocks such as the timer block, chest LED blocks and run until stopped block.

Timer block

If you are new to programming, you will discover that timers are a fundamental component when working with sequences. After you press run, machines typically don't wait to execute all parts of your code unless you tell them to. So if you want to have a smooth and controlled flow of your program, you will need to use the timer block. This block is set in milliseconds, 1000 milliseconds are equal to 1 second.

Chest LED

If you need clear feedback from Misty about the execution of your program, you can rely on the Chest LED. It acts as visual cue or signal that tells you if you've successfully triggered an event. There is a big palette of colors that you can choose from.

The transition led block allows you to cycle between two different colors. There are a couple of options in the drop-down:

  • Breath: does the transition gradually with other colors. For example, if you want to go from red to green it will display red, orange, light orange, yellow and green and backwards in the time you set.

  • Blink does the transition straight between one color and the other.

Log message

This block allows you to display a message on the console. If you are debugging your code or want to read a specific message on your console this is the block you need to use.

Run until stopped

When you are working with events you shouldn't forget about this block.

This block will continuously repeat your program in a loop until you press the stop button. It's fundamental in an event code because Misty needs to constantly monitor her environment and sensors to detect user input. If you don't put this block at the end of your code Misty will run it only once and even if your program is well done it won't really work.

Last updated