Let's Make Robots!

ustream-> Arduino. For My Chess Robot

Ok so the idea is to have live chess matches using Ustream and my chess robot on the front page of LMR. So i understand i need a IRC client and stuff. I have already made a bot and have it linked up to my Ustream. I need serial data from the commands that are typed into ustream from LMR members, like b8->b9, to go to my Arduino so the chess robot can move the piece. I have never written a computer program in my life and i dont know where to start or what to use. Please help so frits will stop bugging me. :)

irc.pl_.txt2.29 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Ok attached the script. Cant get the last if statement working. For some reason move is the last 6 characters of the message, maybe there is a \n in there?

Well looks like i will be going with Perl. Ran this fine http://oreilly.com/pub/h/1964. Getting all the messages from what is being typed into ustream, i just have to break them apart and stuff. 

or the link won't work

HTML is not as resilient as perl ;-)

I think this is the exact same code sample I started out with for Darwinbot. As soon as I find it again, I will post the result.

Save all and save often.

Back to 2010: Save online!


The link you posted has the code you will need I believe. I didn't read to far into it, but from what I can see you can define functions that the python bot will read in IRC and will run Arduino functions based on it. 

In IRC, a user can say "arduino: funcution" which causes a function in the Arduino code to run. In your case you would let players send a message like "arduino: rook to A8.", which would run a function that reads the current location of the players rook and moves it to A8. (I don't play chess much, if A8 doesn't exist, don't make fun of me!)

Tinker with that code, it'll work just as you need.


I found this http://blog.datasingularity.com/?p=148, which exactly what i want to do. He is using Python. I am trying to figure out what programming language would be best for something like this so i can start learning it. Yes any advice on a programming language would be very helpful.

Take it from a veteran.

I can only show you the code I used to interface an IRC channel with ... erhm ... I forgot. I think Darwinbot used several different programs to get code loaded up. The IRC "receiver" simply placed little files on disk.

My code was written in Perl.It does not use any fancy libraries, so the actual interpreting of IRC sentences lies bare in the main code. That could be very educational.

You say you never wrote a computer program. That also can be a good thing. Now you get to choose a language. This is the same kind of choice as the choice for a micro controller or language. Whatever suits you. Ask around for options. Who is willing to support you in your programming and your lessons.

I for one could only help you with Perl and maybe some Processing.org. And be willing to.

Tell Frits he's a PITA. ;-)

If Perl can do this, and you know how to do this, then i might be better off with Perl. Im not sure the level of difficulty that this ranks.