Society of Robots - Robot Forum

Software => Software => Topic started by: Klinger on January 17, 2009, 08:27:56 PM

Title: Controlling a Robot by the keyboard
Post by: Klinger on January 17, 2009, 08:27:56 PM

I am currently building my robot and I want to be able to control it using my keyboard. I know it will be annoying to following my robot with my laptop but this is what need to do for know. I would like to do this by using a USB cable but I don't know how.
This is my first using this ucontroller the ATmega640.  I normally use a freescale HC11 which uses a serial cable to do this which is simpler.

Example would be   'hit 1 to go left'    'hit 2 to go right'....
Title: Re: Controlling a Robot by the keyboard
Post by: Webbot on January 17, 2009, 08:59:47 PM
Since controller work at 5v levels and your PC works via USB or RS232 then you will need some kind of level shifter to plug into the UART of your controller
Title: Re: Controlling a Robot by the keyboard
Post by: cosminprund on January 18, 2009, 12:53:42 AM
Have you considered using Bluetooth for the link to the laptop? The price ranges from $50 to $80 and you make an investment into something you'll reuse, plus you'll skip the cables to the robot!

I've ordered one from here, you'll probably find them cheaper if you're on the proper continent  ;D:
http://www.robot-italy.com/index.php?cPath=42_115

I think those are Sparfun modules, shop around.
Title: Re: Controlling a Robot by the keyboard
Post by: Admin on February 01, 2009, 09:14:52 AM
ATmega640 you say? Source code:
http://erobots.blogspot.com/2008/08/bluetooth-controlled-lights.html