Here we provide short descriptions of some of the more useful CoDrone Lite blocks included in the Snap! for Robolink library.  This page will be updated as the Robolink library develops.

Screen Shot 2016-05-21 at 4.18.32 PM
Contents:
  1. Starting Blocks
  2. Control
  3. Connect
  4. CoDrone
  5. Variables
  6. Operators


Starting Blocks

rb_whenclicked

  • Runs all blocks attached to it when the green flag is clicked

rb_whenkeypressed

  • Runs all blocks attached to it when the specified key is pressed
  • Can be assigned to any key on the keyboard

rb_whenimclicked

  • Runs all blocks attached to it when the block is clicked

 


Control Blocks

rb_waitsecs

  • Waits the specified amount of time before moving on to the next block
  • All previously started commands will continue to perform

rb_forever

  • Repeats whatever blocks are inside the forever block forever

rb_repeatcount

  • Repeats whatever blocks are inside the repeat block for the specified amount of times

rb_stopall

  • Stops all currently running actions
  • The CoDrone will continue to perform the last command it was given

rb_stopallbut

  • Stops all currently running actions except for the blocks attached to this block
  • The CoDrone will continue to perform the last command it was given

Connect

rb_connectonearest

  • Connects to a nearby CoDrone when clicked

rb_connecttoconnected

  • Connects to the previously connected CoDrone when clicked

rb_disconnect

  • Disconnects from the connected CoDrone when clicked

rb_forcedlanding

  • Immediately forces the CoDrone to land when clicked

CoDrone

rb_roll

  • Sets the Roll to the indicated value

rb_pitch

  • Sets the Pitch to the indicated value

rb_yaw

  • Sets the Yaw to the indicated value

rb_throttle

  • Sets the Throttle to the indicated value

rb_sending

  • Sends the Roll, Pitch, Yaw, and Throttle values to the CoDrone to be performed

rb_flightevent

  • Performs the indicated Flight Event maneuver

Variables

make-a-variable

  • Create a new variable

set-_-to

  • Set the selected variable to the indicated value

change-by

  • Add the indicated value to the selected variable

Operators

math-operators

  • Perform the indicated mathematical operation

math-comparitors

  • Compares the two indicated values

and

  • Adds an additional conditional statement with an ‘and’ operator

or

  • Adds an additional conditional statement with an ‘or’ operator

not

  • Changes the conditional statement to the opposite value

true-false

  • Represents true or false