Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Nate_the_Great on July 09, 2007, 02:46:18 PM

Title: Sharp Rangefinder Problem
Post by: Nate_the_Great on July 09, 2007, 02:46:18 PM
I have mounted my Sharp IR Rangefinder on the top of my HS-311 Servo, but it only seems to rotate about 45 degrees (from the centre to its maximum right) instead of the full 90 (max right to max left), the scanner appears to be working as it does see objects but only within the 45 degrees to the right of its centre. do I need to change the threshold values in the code or something or what, I'm kinda stumped and hoping someone out there could help me out/ give me an idea of what could be wrong.

Thanks
Title: Re: Sharp Rangefinder Problem
Post by: KambeiX on July 09, 2007, 03:32:54 PM
post the code you are using, the error must be in the programming.
Title: Re: Sharp Rangefinder Problem
Post by: Admin on July 11, 2007, 06:02:29 PM
Are you using my code?
http://www.societyofrobots.com/robot_50_robot_sharpIR.shtml

You probably dont want it to do a full 180 cause that takes a longer time for a good scan.
Title: Re: Sharp Rangefinder Problem
Post by: Nate_the_Great on July 13, 2007, 10:47:14 AM
I am using the SOR 50_with_sharpIR source code
Title: Re: Sharp Rangefinder Problem
Post by: Admin on July 13, 2007, 11:02:12 AM
I intentionally kept the scanner from rotating the full 180 degrees.

Through my experiments I found it worked much better with much smaller angles - its better for the robot to rotate and the scanner not to.
Title: Re: Sharp Rangefinder Problem
Post by: javafiend on February 19, 2008, 06:39:22 PM
I've got my Sharp IR hooked up and sort of working, but like the Nate_the_Great, I'm also looking to increase my scanning radius.  Currently it turns about 45 degrees one direction but doesn't return beyond center.  Which parts of the 50_robot_sharpIR.c control the scanner rotation?
Title: Re: Sharp Rangefinder Problem
Post by: Admin on February 23, 2008, 03:20:03 PM
Quote
Which parts of the 50_robot_sharpIR.c control the scanner rotation?
Read the comments in the code ;)
There are two variables that define the farthest clockwise and counterclockwise angles.
Title: Re: Sharp Rangefinder Problem
Post by: javafiend on February 24, 2008, 04:02:06 PM
Ah yes, when all else fails, read the comments :)