How to log multiple values ROBOTC/NXT and make decision
Author
Message
rsantana2021
Rookie
Joined: Tue Jan 31, 2012 11:27 pm Posts: 1
How to log multiple values ROBOTC/NXT and make decision
I am trying to get through a tunnel like obstacle and I usually stick to just coordinating time with power, but I would like to kick it up a notch and have an ultrasonic scan both the left and right walls and have it store 2 or more values. From there I would like it to make a decision whether my robot needs to veer right or left until both sides are aligned. How would I go about that? sample code would be awesome, if not, can you guys throw some terminology that I might be able to look up.
Here is what I want it to do (simplified version):
Scan left, readDistance, storeLeftDistance Scan right, readDistance, storeRightDistance if leftSide < rightSide moveright until leftSide == rightSide else moveLeft until leftSide == rightSide
Thanks guys
Tue Jan 31, 2012 11:41 pm
sumasmreq
Rookie
Joined: Fri Jan 27, 2012 6:57 pm Posts: 40
Re: How to log multiple values ROBOTC/NXT and make decision
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