Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: SgtToad on February 29, 2008, 06:42:15 AM

Title: Noob question
Post by: SgtToad on February 29, 2008, 06:42:15 AM
I have make the 50$ robot, it was working great. I add three LED to make some light effect and all works great. Yesterday i receive my rs232 shifter and make the UART interface work. OK now it's my question.

How i can plug my three LED, the 2 servo for the wheel, an other servo for my brand new sharp ir rangefinder and my uart interface ? I need 6 output pin, the ATMega8 have only 5 and 2 of them are for the UART... how i can add output ? adding an other microcontroller ?

Thanks for your help guys
Title: Re: Noob question
Post by: paulstreats on February 29, 2008, 09:23:10 AM
There are definately a lot more outputs available on the atmega8. If you refer back to the diagram in the $50 robot tutorial there are at least 10 with no connections to them. All you have to do is wire them up with power busses like the others and learn how to use them. (which is pretty much the same as using the ones you already have)
Title: Re: Noob question
Post by: Admin on March 09, 2008, 07:52:15 PM
Basically what paulstreats said.

I was too lazy to do it in the tutorial, but you will notice a group of pins on the mcu that aren't connected to anything. If you look at the schematic and code for a bit, I'm confident you can figure out how to add those extra headers and required code.

Just ask when you get stuck and we will help.
Title: Re: Noob question
Post by: SgtToad on March 11, 2008, 08:12:09 AM
I find out how to do what i want. I change two input pin for output and that work great. I currently try to find the best way to write the code to do object avoiding with my servo mounted sharp ir combo. I'll post picture and video when it works.