Tab | Section | Name | Detail |
control | basic |
start | start running a set of blocks |
repeat | continually run the inner blocks |
repeat $ times | run the inner blocks a number of times |
repeat $ from $ to $ step $ | run the inner blocks with specified variable, start, end and steps |
repeat while $ | run the inner blocks while the condition is true |
repeat until $ | run the inner blocks until the condition is true |
wait $ | pause for a duration |
if $ else | runs the first inner blocks if the condition is true, otherwise runs the second inner blocks |
case $ | runs the inner block whose value matches the condition |
advanced |
show/edit program info | display info about variables, arrays and imports |
break out of loop | break out of a loop |
continue to start of loop | continue to start of loop |
stop | stop this program |
$ | to document your code |
$ | write text code |
state |
when in state $ | start running a set of blocks when in a state |
run state machine $ | run a state machine using a variable |
set state to $ | set the current state of this machine |
event |
when $ | run a set of blocks when a condition is true |
task $ | start running a set of blocks when a message is received |
start task $ | start a named task and immeadiately continue |
start task $ and wait | start a named task and wait for it to finish before resuming |
terminal | |
print text $ | send text to the terminal |
print value $ | send a value |
clear screen | clear the terminal screen |
backspace | go back one space |
next line | go to the next line |
goto $,$ | go to the specified point |
receive text into $ | receive text from the terminal and store in an array |
receive number | receive a number from the terminal |
receive byte | receive a byte from the terminal |
data available | test if the terminal has sent something |
sound | |
play synthesized song $ | play a synthesizer file |
stop playing song/effect | stop playing song/effect |
play sound effect $ | play sound effect $ |
play score $ | play score $ |
play wav file $ at volume $ | play a wav file |
record sound for $ ms | record a sound to memory |
play recorded sound at volume $ | play back recorded sound from memory |
read microphone | read microphone |
play tone $ for $ ms | play a musical tone |
set tone volume to $ | change the tone volume |
speak $ | speak text |
speak file $ | speak a word |
spell $ | spell text |
set speech volume to $ | change the speech volume |
speech parameters $,$,$,$ | change the way words are spoken |
set speaker $ to pitch $ | Assign a base pitch to speaker number |
sense | |
read adc on pin $ | read the adc's value |
distance |
IR distance on $ | measure distance with an IR/LED |
ping distance on $ | measure distance with a ping |
brightness on $ | measure brightness with QTI |
mouse |
mouseX | read the x position of the mouse |
mouseY | read the y position of the mouse |
mouseZ | read the z position of the mouse |
set mouse to (0,0,0) | reset x,y and z |
mouse button down | determine if the mouse button was clicked |
key |
key $ pressed | determine if a keyboard key is pressed |
time |
reset timer | reset the internal timer |
elapsed time | read the elapsed time in ms since last reset |
vars | |
random($) | random |
variables |
set $ to $ | set a variable to a value |
change $ by $ | change a variable's value |
set bit $ of $ to $ | set a bit |
get bit $ of $ | get a bit |
arrays |
set $($) to $ | set an array's item to a value |
change $($) by $ | change an array's item |
get $($) | get an array's item |
strings |
set $ to $ | set $ to $ |
set $ to value $ | set $ to value $ |
string $ equals $ | string $ equals $ |
lowercase $ | lowercase $ |
uppercase $ | uppercase $ |
capitalize $ | capitalize $ |
reverse $ | reverse $ |
make $ copies of $ | make $ copies of $ |
trim $ | trim $ |
pad $ to length $ with $ | pad $ to length $ with $ |
replace $ with $ in $ | replace $ with $ in $ |
join $ to $ | join $ to $ |
join $ to $ | join $ to $ |
get $($) | get $($) |
copy substring from $ starting at $ for $ to $ | copy substring from $ starting at $ for $ to $ |
copy string beginning with $ in $ starting at $ to $ | copy string beginning with $ in $ starting at $ to $ |
find index of string $ in $ starting at $ | find index of string $ in $ starting at $ |
find first index of $ in $ starting at $ | find first index of $ in $ starting at $ |
find last index of character $ in $ starting at $ | find last index of character $ in $ starting at $ |
length of $ | length of $ |
convert $ to a number in base $ | convert $ to a number in base $ |
interface | |
background | draw a background image |
skype | communicate with skype |
xmlrpc | communicate with xmlrpc |
ros | communicate with ros |
fiducials | control with computer vision fiducials |
textbox | display and change a variable's value with a textbox |
meter | display a variable's value in a meter |
switch | display and change a variable's value as a switch |
joystick | use a joystick to control two variables |
save | save to file |
gamepad | use a joystick to control two variables |
functions | |
$ ($) locals:$ | define a user function |
return $ | return a value from a function |
pins | input |
count edges on pin $ for $ | count the number of rising edges on a pin |
measure frequency on pin $ for $ | measure the frequency on a pin |
measure pulse on pin $ at state $ | measure the duration of a pulse a pin |
pin $ | read the state of an IO pin |
duration of discharge on pin $ | measure the time until a pin's state changes |
shift data in from pin $ mode $ | shift data into a pin from another device |
serial in from pin $ mode:($,$,$) | read data using the serial protocol |
read i2c on pin $ and reply with $ | read byte using i2c protocol and acknowledge |
read $ bytes from $ into $ | read data from an i2c eeprom |
output |
output frequency $ on pin $ | continually output a frequency on a pin |
output frequency $ on pin $ for $ | output a frequency on a pin for a duration |
set pin $ high | set a pin high |
set pin $ low | set a pin low |
toggle pin $ | change a pin's state from high to low/low to high |
output pulse length $uSec on pin $ | output a pulse |
output pwm $ on pin $ | output a pulse width modulated signal |
output pwm $ on pin $ for $ | output a pulse width modulated signal |
shift out data $ on pin $ mode $ | shift data to a device |
send serial data $ on pin $ mode:($,$,$) | send data with the serial protocol |
initialize i2c device on $ | initialize the i2c device |
send start i2c token on $ | send a start i2c token |
write i2c data $ to pin $ | write data with the i2c protocol |
send stop i2c token on $ | send a stop i2c token |
write $ bytes of $ to $ | write data to an i2c eeprom |
quickly sample the IO pins | quickly sample the IO pins |