Skip to content

Instantly share code, notes, and snippets.

@bjartwolf
Created June 8, 2014 11:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjartwolf/952fe08095045b5e6dc8 to your computer and use it in GitHub Desktop.
Save bjartwolf/952fe08095045b5e6dc8 to your computer and use it in GitHub Desktop.
Change color of Rapiro from Pharo
sPort := SerialPort new.
sPort baudRate: 57600.
sPort close.
sPort openPort: '/dev/ttyAMA0'.
sPort nextPutAll: '#PR010G255B255T001'.
@bjartwolf
Copy link
Author

Basically just sends R G B colors, but all commands can be used such as:

M1 - robot will move forward

M2 - robot will move backward

M3 - robot will turn right

M4 - robot will turn left

M5 - robot will raise his hand and wave the left hand. LED will become green and flashing

M6 - robot will lower his left hand. LED will become Yellow

M7 - robot will move both arm and contract his hands. LED will become Blue

M8 - robot will wave goodbye with his left arm. LED will become RED.

M9 - robot will raise its right arm and move its waist. LED will become BLUE

M0 - robot will go to initial position

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment