View unanswered posts | View active topics It is currently Tue Jul 22, 2014 7:27 am






Reply to topic  [ 3 posts ] 
Set int value based of of sensor value 
Author Message
Rookie

Joined: Mon Feb 14, 2011 3:24 pm
Posts: 2
Post Set int value based of of sensor value
Hi,

We are trying to make a goal following robot using light sensors, and since it is based off of the light values, they have to update for each match. I have an idea of what the code should be telling the robot, but I don't know how exactly to do it. I know it should be something like:

int distance = (sensorvalue[light])

but I'm afraid if I do that, then it will be updating the code when ever it moves, when the value needs to remain constant throughout the antonymous.

Our last programmer had to leave the team; therefore I had to take over and I only have little bit of experience with robotc.

Any help would be great! Thanks!


Mon Feb 14, 2011 11:13 pm
Profile
Rookie

Joined: Wed Dec 08, 2010 5:11 pm
Posts: 3
Post Re: Set int value based of of sensor value
Are you trying to measure distance by light brightness?


Tue Feb 15, 2011 12:54 pm
Profile
Rookie

Joined: Mon Feb 14, 2011 3:24 pm
Posts: 2
Post Re: Set int value based of of sensor value
Yeah, that's what we are trying to do.


Tue Feb 15, 2011 3:03 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 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:  



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