Blockly PNP Blocks

What functions do we require blocks for in Blockly so we can encourage Jake to control a set of RCServos:

RCServo specific:

  • Start servo
  • Stop Servo
  • Position servo (0-180 degrees)
  • Set movement speed (1-10)

All send XMLHTTPRequests to the server, with response ignored for now...

Functions:

  • DelayMS

Later:

Add to editor screen user buttons & 2 x displays:

Button blocks: (6 to start:)

  • OnClick call procedure
  • Rename

Display for user output:

  • Print
  • PrintAppend
  • Clear
  • PrintLine?

Display for XMLHTTPRequest response messages:

  • No blocks but..
  • Output last n XMLHTTPRequest responses
    • Perhaps a count of ok vs not ok

Later:

Hmm the ability to retrieve servo info.. and respond to events, for instance a switch matrix..


Other thoughts

Ultimately we would like to script sets of fixed sequences of events:

  • initiated by:
    • on screen buttom press
    • physical button press
    • sensor (switch or other)
    • ideally by inserting them onto a stack

xxx