|
Page 1 of 1
|
[ 3 posts ] |
|
Set int value based of of sensor value
Author |
Message |
roboblu
Rookie
Joined: Mon Feb 14, 2011 3:24 pm Posts: 2
|
 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 |
|
 |
Hawk
Rookie
Joined: Wed Dec 08, 2010 5:11 pm Posts: 3
|
 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 |
|
 |
roboblu
Rookie
Joined: Mon Feb 14, 2011 3:24 pm Posts: 2
|
 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 |
|
|
|
Page 1 of 1
|
[ 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
|
|