Created
June 8, 2014 11:14
-
-
Save bjartwolf/952fe08095045b5e6dc8 to your computer and use it in GitHub Desktop.
Change color of Rapiro from Pharo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sPort := SerialPort new. | |
sPort baudRate: 57600. | |
sPort close. | |
sPort openPort: '/dev/ttyAMA0'. | |
sPort nextPutAll: '#PR010G255B255T001'. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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