Go to Post Stand strong mentors. You never know who you have become a brother, sister, father, or mother to. - MysterE [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-02-2012, 20:16
eovnu87435ds eovnu87435ds is offline
Registered User
FRC #0087
 
Join Date: Jan 2010
Location: Mt. Holly NJ
Posts: 19
eovnu87435ds has a spectacular aura abouteovnu87435ds has a spectacular aura abouteovnu87435ds has a spectacular aura about
NXT Light Tracking

Hey, can anybody help me figure this out? If there is a light source that is, say 7 ft away from a NXT bot with a light sensor, and my goal is to move towards it, how do I get there? I know that I can have the robot move in a circle until it finds a value higher than 50 or so, but when the robot is at 7ft, it reads 50, and as it moves closer it goes up to 90. What would be the best way to get to that light source?

In psuedo code I was thinking this, but Im not sure if its possible or even if it is the best way, but here is what im thinking.
Code:
left motor val=60
right motor val=75
read light sensor. the value should eventually rise until it passes infront of the light, and then it starts falling
when the light value starts going lower than that highest point, 
left motor val=75
right motor val= 60
That should have some sort of snake like pattern that the robot should follow towards the light.

How can I make that work in LabVIEW?

Thanks,

Mike
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:16.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi