Thursday, June 3, 2010

Commands for Cricket-MicroWorlds communication

  • sendmessagetomicroworlds: This command will send a numerical message to the MicroWorlds program. For example, if you tell the Cricket "sendmessagetomicroworlds 1" the robot will send the number 1 to MicroWorlds.

  • messagefromrobot: This command reads the message sent from the robot. For example, if you tell MicroWorlds 
if messagefromrobot = 1 [melody1]

MicroWorlds will play a melody file if it reads the number 1 from the robot. You would want to loop this, as in a button set to forever.

No comments: