Robolink

Block Guide

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. [ps2id url=’#Starting’]Starting Blocks[/ps2id]
  2. [ps2id url=’#Control’]Control[/ps2id]
  3. [ps2id url=’#Connect’]Connect[/ps2id]
  4. [ps2id url=’#CoDrone’]CoDrone[/ps2id]
  5. [ps2id url=’#Variables’]Variables[/ps2id]
  6. [ps2id url=’#Operators’]Operators[/ps2id]



[ps2id id=’Starting’/]

Starting Blocks

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

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

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

 


[ps2id id=’Control’/]

Control Blocks

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

  • Repeats whatever blocks are inside the forever block forever

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

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

  • 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


[ps2id id=’Connect’/]
Connect

  • Connects to a nearby CoDrone when clicked

  • Connects to the previously connected CoDrone when clicked

  • Disconnects from the connected CoDrone when clicked

  • Immediately forces the CoDrone to land when clicked


[ps2id id=’CoDrone’/]
CoDrone

  • Sets the Roll to the indicated value

  • Sets the Pitch to the indicated value

  • Sets the Yaw to the indicated value

  • Sets the Throttle to the indicated value

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

  • Performs the indicated Flight Event maneuver


[ps2id id=’Variables’/]
Variables

  • Create a new variable

  • Set the selected variable to the indicated value

  • Add the indicated value to the selected variable


[ps2id id=’Operators’/]
Operators

  • Perform the indicated mathematical operation

  • Compares the two indicated values

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

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

  • Changes the conditional statement to the opposite value

  • Represents true or false