View unanswered posts | View active topics It is currently Fri Aug 01, 2014 9:54 am






Reply to topic  [ 3 posts ] 
POE RobotC Errors (Help) 
Author Message
Rookie

Joined: Tue May 08, 2012 11:08 am
Posts: 1
Post POE RobotC Errors (Help)
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);

Please help, as our grade depends on it. ASAP


Thu May 10, 2012 11:12 am
Profile
Expert

Joined: Thu Sep 29, 2011 11:09 pm
Posts: 184
Location: Michigan USA
Post Re: POE RobotC Errors (Help)
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
Profile WWW
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post 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.


Thu May 10, 2012 11:29 am
Profile WWW
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.