
jstarne1

I have has excellent success in this hack thanks to EZ- Robot and now I need a little assistance. The Movement Panel works great, but ultimately it must be a autonomous script. I need to know what verbage / language to use when scripting. I will give example of some things that must happen.
To Dock -
INIT ( initialize)
Select Clean
Select Seek Dock
To undock itself-
Select Disable sensors
Select INIT (initialize)
Select Disable Sensors ( agian)
Drive in Reverse
Can anyone write an acceptable example for each of these to try. I will research it in the meantime but combining talents makes things so much quicker.
EDIT: I found this as well, now I just need help putting it all together
Roomba( cmd )
Execute the specified command on a connected Roomba Vacuum on Port D0 and EZ-B 0. Look for the available Roomba commands further below in this document.
You may also add the Roomba Movement Panel for graphical controls.
Example: Roomba(init)
Example: Roomba(SideBrushOn)
Roomba Commands-
Init
EnableSensors
DisableSensors
PowerOff
SpotClean
Clean
MaxClean
DisableAllBrushes
MainBrushOn
MainBrushOff
SideBrushOn
SideBrushOff
VacuumOn
VacuumOff
SeekDockingStation
Return to base from sitting-
Roomba(Init)
Roomba(Clean)
Roomba(Seekdockingstation)
Do I need to enter a wait timer between or is this fine?
Remove from base-
Roomba(disablesensors)
Roomba(Init)
Roomba(Reverse)
Do an internet search for this document: iRobot® Roomba® Serial Command Interface (SCI) Specification
That document contains all the commands that can be sent to your Roomba.
The script commands will look something like this to start
Code:
Here are some scripts I currently use on my Robot with ICreate platform with voice commands.
I use the script below in connection script, beep allows me to know Create is init. You must use the "" now in all the commands.
Roomba("init")
#Beep
SendSerial(D0,57600,140,3,1,90,32,141,3)
My robot is somewhat tall, the command below reduces rocking.
# Forward slow Command
SendSerial(D0,57600,137,0,100,128,0)
sleep(500)
#forward
SendSerial(d0,57600,137,0,180,128,0)
sleep(2000)
# Forward slow Command
SendSerial(D0,57600,137,0,100,128,0)
sleep(500)
#stop
SendSerial(D0,57600,137,0,0,0,0)
#REVERSE
SendSerial(D0,57600,137,255,56,128,0)
sleep(2000)
#stop
SendSerial(D0,57600,137,0,0,0,0)
Roomba Commands
. Init
. EnableSensors
. DisableSensors
. PowerOff
. SpotClean
. Clean
. MaxClean
. DisableAllBrushes
. MainBrushOn
. MainBrushOff
. SideBrushOn
. SideBrushOff
. VacuumOn
. VacuumOff
SeekDockingStation
I cannot test the docking for you, because my docking station is broken.
There are other usefull scripts by RobMcc and Doug Pope.
Good Luck,
Steve S
Edit- I don,t know why the smilling face shows above with the
Roomba("init")
Did any of the script suggestions help you?
You can change the script arrangements and sleep times to fit your wishes.
Don,t forget the " " around Roomba commands. Example Roomba("SeekDockingStation")
Steve S
The script for turning right is, sleep value gives my Robot about a 90 degree turn. You can adjust.
#Right
SendSerial(D0,57600,137,0,100,255,255)
Sleep(3000)
SendSerial(D0,57600,137,0,0,0,0)
#Left
SendSerial(D0,57600,137,0,100,0,1)
sleep(3000)
SendSerial(D0,57600,137,0,0,0,0)
Steve S
I.E.
Code:
That's provided those commands are correct, I've not got a roomba to play with so have never used the commands.
The newest update (today) should now include the roomba and robosapien commands in the Cheat Sheet "click & paste" section of EZ-Script.
I did a short video on my Robot Captain Ann Droid showcase showing her startup connection script using the
Roomba("init") command with SendSerial Beep, The above movement SendSerial scripts from voice commands,
and a Halloween tribute to Poe using SendSerial movements from script.
I have had some success using the Wi remote as a teach pendant for the recorder (maybe you might have your chiller project move around the room to serve guests @ certain locations?). The new EZB4 will be an advancement with the receive serial function from the Roomba wheel encoder info packets.
Steve S