
PicoBlocks - Reference
1
this
way
that
way
this
way
that
way
motor
onfor
10
motor
onfor
10
sets motor to one direction
turns on for 10 ticks
sets motor to the opposite direction
turns on again for 10 ticks
thisway
sets the motor in one direction,
thatway
sets it in the other direction. Which direction
is which depends on how the motor is plugged in.
thisway
and
thatway
do not turn on the
motor, they only set the direction.
set
power
set
power
10
motor
on
sets motor power to 10
turns the motor on
setpower
takes values between 0 (no power) and 100 (strongest power).
setpower
does not
turn on the motor, it only sets the power.
Default value:
setpower 100
Sensors Blocks
touch?
is the
touch sensor
if
then
forever
chirp
touch?
being pressed?
chirps if the
touch sensor
is pressed
touch?
reports true when the touch sensor is being pressed. The example above will make
the Cricket chirp continuously while you are pressing the button on the touch sensor. If you
want to chirp only once each time you push the button, you should make a stack similar to
the one shown below: