Basic Block-Examples
Examples:
1)Show Number:
To show the number 10:
This example uses a for loop to show numbers 0 through 5 on the screen:
2)Show LEDs:
This program shows a picture with the shoe LEDs function.
3)Show Icon:
This program shows a happy face and then a sad face with the show Icon function, with a one second pause in between.
4)Show String:
This program shows the word SEHS
To show what is stored in a String variable:
6)Clear Screen:
The following code shows a heart on the screen and then turns off all the LED lights.
7)forever:
The following example constantly checks the compass heading and updates the screen with the direction.
8)Pause:
Diagonal line:
This example draws a diagonal line by turning on LED 0,0 (top left) through LED 4,4 (bottom right). The program pauses 500 milliseconds after turning on each LED. Without pause, the program would run so fast that you would not have time to see each LED turning on.
9)Show Arrow:
This program shows all eight arrows.