Society of Robots - Robot Forum

General Misc => Misc => Topic started by: MaltiK on November 27, 2008, 12:11:05 PM

Title: Sharp IR with 50 Dollar Robot Question
Post by: MaltiK on November 27, 2008, 12:11:05 PM
In this code here:

http://www.societyofrobots.com/downloads/robot_source_50_sharpIR_v1.zip

What are the connections for:

The panning servo that the Sharp IR is mounted on
And the two Motors
Title: Re: Sharp IR with 50 Dollar Robot Question
Post by: pomprocker on November 28, 2008, 02:16:02 PM
Oh, I'm sorry, I misread your post.

If you look at the pinout of the mega8:
(http://intosia.com/wp-content/arduino-to-atmega8-pins.png)

your UART would go into RXD(PD0) and TXD(PD1), your drive servos will go into PD2 and PD3 (if when you turn your robot on and it goes backwards, than just reverse how they are plugged into these pins). The scanning servo is plugged into where the LED is, PD4. I think you should comment out all LED code for PD4 when using a scanning servo.
Title: Re: Sharp IR with 50 Dollar Robot Question
Post by: MaltiK on November 29, 2008, 12:14:57 PM
How were you able to find that out? Is it in the code?
Title: Re: Sharp IR with 50 Dollar Robot Question
Post by: pomprocker on November 29, 2008, 12:51:10 PM
it is in the sharp ir tutorial, as well as the uart tutorial.
Title: Re: Sharp IR with 50 Dollar Robot Question
Post by: Admin on December 02, 2008, 04:08:29 AM
The connections can be seen in:
the video (I say where, and show where)
the source code (in the main section of the code)

for example, if you see:
scan_thresh=a2dConvert8bit(3);//sensor reading
that means it connects to the 3rd ADC, or ADC3, which in the pinout is PC3 or pin 26

from memory I think I used PD2 for the 3rd servo, but check the code just in case

ps - I deleted the flaming ;D