Cricket Tutorial — The Repeat Command

The repeat command will repeat a sequence of instructions however many times you like. See the examples below:

turns on output A for 1 second, reverses it, and repeat for a total of 5 times.

flash the output B lamp 10 times.

  The first time the Virtual Cricket loads there will be a short delay.
Please be patient.

Your turn... write code to alternately flash the lamp for a half-second, then run the motor for a half-second, a total of 10 times:


BACK: Lamps and Motors

UP to index

NEXT: Run This Line