Roomba Template
From GICLWiki
This is a template for starting a program in Processing for Roomba. 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*) :::::::::::::
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}