View unanswered posts | View active topics It is currently Fri May 29, 2015 4:12 pm






Reply to topic  [ 5 posts ] 
Snatcher - HT Color sensor 
Author Message
Novice

Joined: Sun Jun 13, 2010 9:26 am
Posts: 58
Post Snatcher - HT Color sensor
Hello::

I built the Snatcher robot in Laurens Valk's book "The Lego Mindstorms NXT 2.0 Discovery". I am having troubles getting the HiTechnic color sensor (version 1) to work. I have managed to get the robot to raise its arm, spin around looking for an object within 45 cm. If it sees something then lower the arm and drive forward. I am still having troubles coordinating the ultrasonic sensor reading with how farward the robot needs to travel before it has the object within the gripper's range. I then thought maybe I could use the color sensor to detect the object. When I run the program I do not get any value for the color sensor (color1 variable). What am I doing wrong?

I have run the HTCS-test1 sample program and it works just fine.

Mike,


Attachments:
searcher2.c [2.91 KiB]
Downloaded 251 times
Sun Aug 15, 2010 11:43 am
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3504
Location: Rotterdam, The Netherlands
Post Re: Snatcher - HT Color sensor
Mike,

Thanks for using my driver suite. You should consider downloading and installing the latest version of it from here: [LINK].

I don't see anything wrong with your code, however, from your description it is unclear what it is you're trying to do with the colour sensor. At what distance are you hoping to detect the ball using the colour sensor?

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Aug 21, 2010 3:36 am
Profile WWW
Novice

Joined: Sun Jun 13, 2010 9:26 am
Posts: 58
Post Re: Snatcher - HT Color sensor
Hello Xander:

I finally figured out the color sensor problem, not sure what was wrong. I did change the final slash in the two includes.

I have not had a lot of time lately to work on my robot but what I wanted to do was once the ultrasonic sensor detected an object of a certain size that if within that size drive towards it and then use the color sensor first to detect when the robot is close enough and secondly that the object is the right color. I am sure that when I get some more time, hopefully in the next few days, I will need some additional help.

I will also download the newest drivers and see if that also helps.

Thank you for your help.

Mike,


Tue Aug 24, 2010 5:30 pm
Profile
Rookie

Joined: Tue Mar 17, 2015 7:28 am
Posts: 1
Post Re: Snatcher - HT Color sensor
Hello Lego Geek,

Can I Get the full coding of your project since you are using ROBOTC. A.S.A.P It will be useful for me


Tue Mar 17, 2015 7:33 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 695
Post Re: Snatcher - HT Color sensor
UTP Lego wrote:
Hello Lego Geek,

Can I Get the full coding of your project since you are using ROBOTC. A.S.A.P It will be useful for me


Please note the age of the thread before posting in the future; this thread has been dormant for almost 5 years, and the original poster should instead be contacted via PM (Private Message). Thank you in advance!

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.


Wed Mar 18, 2015 10:40 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.