How do we program two light sensors to both work at the same time?
We used the following line of code to get both light sensors working at the same time, but one has to be set off first and then the other one needs to be set of in order to work: untilDark(350, lightSensor); untilDark(220, lightSensor2);
You want it to only continue once both light sensors are dark? Normally you could do that with something like this (excuse the lack of ROBOTC specifics):
Code:
until((Sensor(1)<350) && (Sensor(2)<220));
Can you provide your code?
_________________ Matt
Thu May 10, 2012 11:28 am
NeXT-Generation
Senior Roboticist
Joined: Wed Sep 28, 2011 10:13 pm Posts: 509 Location: Totally not spying on Hassenplug to see what he has for the Brickworld Chicago 2013 sumo contest.
Re: POE RobotC Errors (Help)
First of all, shouldn't this be in the programming forum? Second of all, we needs moar info! What platform are you using? What's your entire code? How is your robot configured? The better you explain your problem, the better the help you'll get.
_________________ A.K.A. inxt-generation Self-proclaimed genius, and future world dominator. My Brickshelf Folder "Don't they teach recreational mathematics anymore?" - The Tenth Doctor Bow down to Nikola Tesla, King of the Geek Gods.
Users browsing this forum: No registered users and 3 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