| 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 |
| wait $ | pause for a duration |
| if $ | runs the inner blocks if the condition is true |
| 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 |
| $ | spin code |
| $ | to document your 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 |
| graphics | 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 | speech |
Speak on pin $ | Startup Text to Speech |
| Stop speaking | Stops Text to Speech |
| Set speaker $ to pitch $ | Assign a base pitch to speaker number |
| Spell the string $ | Spell |
| Speak the string $ | Speak a word or phrase |
| motion | servos |
set servo $ to $% | set a servo's position |
| ramp servo $ to $% over $ | move a servo to a new position over time |
| idle servo $ | idle a servo- don't power it |
| sense | distance |
ping distance on $ | measure distance with a ping |
| brightness on $ | measure brightness with QTI |
| time |
reset timer | reset the internal timer |
| elapsed time | read the elapsed time in ms since last reset |
| adc |
outgoing pin $, incoming pin $, clock pin $, reset pin $, $ channels, scan $ channels, ADC outputs $ bits, mode $ | initialize the ADC object |
| Stop ADC | stops cog if running |
| reset min/max | reset adc minimum and maximum values for all channels |
| frequency on $ for $ msec | measure the frequency on this channel |
| average on $ for $ msec | measure the average on this channel |
| max on $ | return maximum on this channel |
| min on $ | return minimum on this channel |
| value on $ | return value on this channel |
| vars | |
random($) | random |
| variables |
set $ to $ | set a variable to a value |
| change $ by $ | change a variable's value |
| 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 |
| 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 |
| export | 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 $ | 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 $ | 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 |
| shift out data $ on pin $ | 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 |
| memory | eeprom |
In Address name $ store byte $ | permanently store a byte in EEPROM |
| In Address name $ store word $ | permanently store a word in EEPROM |
| In Address name $ store long $ | permanently store a long in EEPROM |
| retrieve value from $ | retrieve a value from memory |
| change existing name $ to new name $ | edit the name of a value |
| delete name $ | delete an entry from memory |
| size of $ | return the current size of a value in bytes |
| value present at $ | check if a value is already set |
| Plant Whisperer | |
_memory_lightweight_demo.Main | call the function named:_memory_lightweight_demo.Main |
| _pasm_i2c_driver.Initialize($) | call the function named:_pasm_i2c_driver.Initialize |
| _pasm_i2c_driver.Start($) | call the function named:_pasm_i2c_driver.Start |
| _pasm_i2c_driver.Stop($) | call the function named:_pasm_i2c_driver.Stop |
| _pasm_i2c_driver.Read($,$) | call the function named:_pasm_i2c_driver.Read |
| _pasm_i2c_driver.Write($,$) | call the function named:_pasm_i2c_driver.Write |
| _pasm_i2c_driver.ReadPage($,$,$,$,$) | call the function named:_pasm_i2c_driver.ReadPage |
| _pasm_i2c_driver.WritePage($,$,$,$,$) | call the function named:_pasm_i2c_driver.WritePage |
| _pasm_i2c_driver.ReadByte($,$,$) | call the function named:_pasm_i2c_driver.ReadByte |
| _pasm_i2c_driver.ReadWord($,$,$) | call the function named:_pasm_i2c_driver.ReadWord |
| _pasm_i2c_driver.ReadLong($,$,$) | call the function named:_pasm_i2c_driver.ReadLong |
| _pasm_i2c_driver.WriteByte($,$,$,$) | call the function named:_pasm_i2c_driver.WriteByte |
| _pasm_i2c_driver.WriteWord($,$,$,$) | call the function named:_pasm_i2c_driver.WriteWord |
| _pasm_i2c_driver.WriteLong($,$,$,$) | call the function named:_pasm_i2c_driver.WriteLong |
| _pasm_i2c_driver.WriteWait($,$,$) | call the function named:_pasm_i2c_driver.WriteWait |
| _talk_demo.start | call the function named:_talk_demo.start |
| _VocalTract.start($,$,$,$) | call the function named:_VocalTract.start |
| _VocalTract.stop | call the function named:_VocalTract.stop |
| _VocalTract.set_attenuation($) | call the function named:_VocalTract.set_attenuation |
| _VocalTract.set_pace($) | call the function named:_VocalTract.set_pace |
| _VocalTract.go($) | call the function named:_VocalTract.go |
| _VocalTract.full | call the function named:_VocalTract.full |
| _VocalTract.empty | call the function named:_VocalTract.empty |
| _VocalTract.sample_ptr | call the function named:_VocalTract.sample_ptr |
| _VocalTract.aural_id | call the function named:_VocalTract.aural_id |