Roomba Template
From GICLWiki
(Difference between revisions)
| (One intermediate revision by one user not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Roomba Design Lab (Winter 2007)]] | [[Category:Roomba Design Lab (Winter 2007)]] | ||
| − | This is a template for starting a program in Processing for Roomba. The template itself can be found at [[ | + | This is a template for starting a program in Processing for Roomba. The template itself can be found at the [[downloads]] page. |
==Using Roomba Template== | ==Using Roomba Template== | ||
| − | You must replace the Roomba Port with your own where it says "[DELETE THIS AND ENTER YOUR ROOMBA PORT]": | + | You must replace the Roomba Port with your own where it says '''"[DELETE THIS AND ENTER YOUR ROOMBA PORT]"''': |
//This stops Roomba and disconnects it from your computer. | //This stops Roomba and disconnects it from your computer. | ||
String roombacommPort = '''"[DELETE THIS AND ENTER YOUR ROOMBA PORT]";''' // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::::::::::::: ENTER YOUR ROOMBA PORT ::::::::::::: | String roombacommPort = '''"[DELETE THIS AND ENTER YOUR ROOMBA PORT]";''' // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::::::::::::: ENTER YOUR ROOMBA PORT ::::::::::::: | ||
| Line 10: | Line 10: | ||
RoombaCommSerial roombacomm = new RoombaCommSerial(); | RoombaCommSerial roombacomm = new RoombaCommSerial(); | ||
roombacomm.waitForDSR = hwhandshake; | roombacomm.waitForDSR = hwhandshake; | ||
| − | and then simply type your code between the while loop: | + | and then simply type your code between the '''while loop''': |
while (!done) | while (!done) | ||
{ | { | ||
Latest revision as of 12:48, 3 February 2007
This is a template for starting a program in Processing for Roomba. The template itself can be found at the downloads page.
Using Roomba Template
You must replace the Roomba Port with your own where it says "[DELETE THIS AND ENTER YOUR ROOMBA PORT]":
//This stops Roomba and disconnects it from your computer. String roombacommPort = "[DELETE THIS AND ENTER YOUR ROOMBA PORT]"; // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<::::::::::::: ENTER YOUR ROOMBA PORT ::::::::::::: //String roombacommPort = "/dev/cu.RooTooth-COM0-1"; boolean hwhandshake = false; RoombaCommSerial roombacomm = new RoombaCommSerial(); roombacomm.waitForDSR = hwhandshake;
and then simply type your code between the while loop:
while (!done)
{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ::::::::::::: START CODE (Code goes between this thing and.... *look down*) :::::::::::::
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//[DELETE THIS LINE AND ENTER YOUR OWN CODE!]
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ::::::::::::: END CODE (Code goes between this thing and... *look up*) :::::::::::::
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}