Connection to the Create

8 replies [Last post]
WardMelville
Title: NooBot+
Joined: 03/24/2010
Posts:
BotPoints: 9
User offline. Last seen 13 years 8 weeks ago.

We are trying to program the Create without the CBC and we have a couple of questions for you guys. What terminal program would you suggest to use for communication between the Create and the computer? Should the LED's on the serial cable provided blink for incoming and outgoing traffic between the Create and the computer? Finally, do you have any suggestions and common mistakes that we can watch out for when programming our Create? Thank you.

Jeremy Rand
Jeremy Rand's picture
Title: Botball Youth Advisory Council
Joined: 04/03/2009
Posts:
BotPoints: 1168
User offline. Last seen 8 years 1 week ago.

In general, you need some kind of controller attached to the Create unless you're using Open Interface Scripts. This controller doesn't have to be a CBC; I think you're trying to use a PC as that controller. If this is the case, I would not recommend a generic terminal program; I would recommend that you use a Create library in a program that you write. If I recall correctly, KISS-C has a PC Create library, although I haven't tried it. There are also Create libraries for Java floating around, although again, I haven't tried them. FYI, there's a nice piece of hardware called a RooTooth which lets you control your Create from a PC via BlueTooth, without needing a serial cable.

If I misread your post and you are in fact trying to use Create OI scripts, I would recommend either an XBC or CBC to load the script. While a PC could do it, it's a bit unwieldy. I've published 2 GCER papers on using the XBC to load scripts, and CBCJVM recently added support for script loading on the CBC. You could also load scripts on a CBC with KISS-C with minimal effort now that the serial libs are open-source.

Let me know if you have any additional questions. :-)

-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS

WardMelville
Title: NooBot+
Joined: 03/24/2010
Posts:
BotPoints: 9
User offline. Last seen 13 years 8 weeks ago.

We are using the OI and we need it to be unteathered from the CBC and Computer so we can use it in botball this year without a controller device. We can't seem to get a proper connection between the serial cable and the create because the cable provided by KIPR has activity LED's that never turn on.

So from your last post I'm getting that you are suggesting the use of a CBC or XBC to load OI scripts onto the Create. Once we download those scripts to the Create would we be able to to disconnect the CBC/XBC? I've been looking on the irobot website and using the command scripts (uploaded from a terminal program on the computer) but the robot never responds to any commands i send it. I'm a little lost :X any help you can provide would be great. Thanks again.

WardMelville
Title: NooBot+
Joined: 03/24/2010
Posts:
BotPoints: 9
User offline. Last seen 13 years 8 weeks ago.

On another note; according to the manual that comes with the Irobot we should be able to script a program and down load it into the bot to run a simple route such as having the bot travel in a square. We are using Win Realterm. It seems to work up until the point of downloading the script into the bot. We have the serial cable connected to the bot and when we try to send the program we recieve a message but its written in computer garbage such as smily faces and little hearts. I dont believe we are making a connection between the bot and the PC because we are not getting any LED lights on the cable flashing. According to my research from the Irobot web site when connected we should receive a welcome message and then be able to download a script to take the bot out of demo mode and switch into full mode and then have full control with a program. I know this can be done because I have seen it done in previous years, but as of now we cant seem to get it to communicate. Any help would be very helpful.
Thanks
Ward Melville

Jeremy Rand
Jeremy Rand's picture
Title: Botball Youth Advisory Council
Joined: 04/03/2009
Posts:
BotPoints: 1168
User offline. Last seen 8 years 1 week ago.

Yes, once you have loaded an OI script onto the Create, you can disconnect the XBC/CBC. The script will remain running until it terminates or until the Create is power-cycled. I recommend an XBC or CBC instead of a PC because if something screws up at the game table during setup, you'll want to be able to reboot the Create and reload the script. You might also want to load a test script to test the starting light at the game table, and then reboot the Create and load your regular script. An XBC/CBC makes this quite easy.

If you have access to the 2008 and 2009 GCER proceedings, you can find my two papers on Create OI scripts and their use in Botball. If you don't have access to them, let me know and I'll see if I can post them on the community site.

-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS

AdamF
Title: MiniBot+
Joined: 03/17/2010
Posts:
BotPoints: 62
User offline. Last seen 10 years 2 weeks ago.

Our team did this last year; we used the create as a blocker in addition to two cbc bots. I used RealTerm (google it) to send the byte stream to the create. If you haven't, get your hands on the Create OI pdf, that has tons of info on how to use byte code to control the create.

You have to realize that the create can only have one script at a time and it's limited to 100 bytes, so its not extremely useful.

I wrote out the byte code scripts by hand at first and then hand-compiled them into streams of bytes to send via realterm. Eventually I wrote a crappy IDE in FreeBASIC that can help you write code and compile it into a string for you, but I'm not comfortable passing it out (for one it's extremely shoddy work).

Adam Farabaugh
Hampton High School

matthewbot
Title: YAC
Joined: 04/12/2009
Posts:
BotPoints: 94
User offline. Last seen 12 years 46 weeks ago.

Also, I wouldn't be too concerned with the LEDs on the serial cable; if I recall from some brief experiments a while back, they really don't light up much when you're sending and receiving in small sporadic chunks through realterm or whatever. If you put the create in stream mode I seem to recall it lighting up quite nicely though.

If you're seeing ASCII characters (computer garbage) on your realterm, you might want to change the display format. I don't recall exactly how but there is a way to make it show you the byte's numerical values instead of just their visible characters. Once this mode is on, you should be able communicate using byte numbers according to the create OI (http://www.irobot.com/filelibrary/create/Create Open Interface_v2.pdf).

--
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction.

Albert Einstein

Project Quadcopter: http://quadcopter.wordpress.com/

Jeremy Rand
Jeremy Rand's picture
Title: Botball Youth Advisory Council
Joined: 04/03/2009
Posts:
BotPoints: 1168
User offline. Last seen 8 years 1 week ago.

AdamF: The Create can actually handle quite a bit more than 100 bytes. I believe I was the first person to document this feature (the Roomba hacking forums had never heard of it); it's called Input Buffer Scripting. You get somewhere around 350 bytes, and more if your script is repetitive. My 2009 paper discusses the feature. If I recall correctly, CBCJVM uses Input Buffer Scripting by default, and it was easy for me to get the XBC to do it. KISS-C should be easy too, although I haven't tried.

-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS

WardMelville
Title: NooBot+
Joined: 03/24/2010
Posts:
BotPoints: 9
User offline. Last seen 13 years 8 weeks ago.

Thanks for all of your thoughts everyone. Jeremy, if you could please send me those papers because I'm not too sure on how i would access them.

Thanks again.