Calico Jigsaw: Myro

From IPRE Wiki
Jump to: navigation, search

Myro is a library for working robotics (real and simulated), text-to-speech, functions for tone generation, image processing and much more. The Calico Myro library has been written to be used by any of the Calico languages. It is designed to work with either the Scribbler robot, simulated Scribbler, or the LEGO NXT brick.

Jigsaw can use any of the Myro functions. You might find it helpful to view the Calico Myro reference manual, although the syntax used there is for Python.

Getting Started

To use Myro from Jigsaw:

  1. Open a Jigsaw script (new or a previously created one)
  2. Add the Myro module: menu -> Edit -> Use a Module -> Myro
  3. That will add a set of new Tabs on the left-hand side of the Jigsaw screen
  4. Drag different blocks onto the workspace

Here is a sample programming using the Myro library:

Calico-jigsaw.gif

Using a Scribbler Robot

To use a Scribbler2 robot in Jigsaw:

  1. Setup Bluetooth to talk to your robot
  2. Create a New Jigsaw Script
  3. Use the Myro module (menu -> Edit -> Use a Module... -> Myro)
  4. Drag the "init(port)" block from the Robot tab to the "when program starts" block
  5. Change port to your "COMX" port (with quotes) [change the X to your com port number]
  6. Drag the "joystick()" block from the Movment tab to the "when program starts" block
  7. Run the script [double-click the "when script starts" block]

Using a Simulated Scribbler Robot

To use a Simulated Scribbler2 robot in Jigsaw:

  1. Create a New Jigsaw Script
  2. Use the Myro module (menu -> Edit -> Use a Module... -> Myro)
  3. Drag the "init(port)" block from the Robot tab to the "when program starts" block
  4. Change port to "sim" (with quotes)
  5. Drag the "joystick()" block from the Movment tab to the "when program starts" block
  6. Run the script [double-click the "when script starts" block]

Using a NXT Robot

To use a LEGO NXT robot in Jigsaw:

  1. Create a New Jigsaw Script
  2. Use the Myro module (menu -> Edit -> Use a Module... -> Myro)
  3. Drag the "makeRobot()" block from the Robot tab to the "when program starts" block
  4. Change the robot_type to "NxtRobot" (with quotes)
  5. Change the args to nothing
  6. Run the script [double-click the "when script starts" block]