View unanswered posts | View active topics It is currently Thu Jul 31, 2014 1:35 pm






Reply to topic  [ 3 posts ] 
setting up light sensor issues 
Author Message
Rookie

Joined: Tue Aug 14, 2007 1:38 pm
Posts: 16
Post setting up light sensor issues
I am trying to set up the light sensor in Robotc 3.04 Instead of using the sensor setup I have my students set them up themselves. When we write:

SensorType[0]=sensorReflection; compiles but does not read sensor
SensorType[in1]=sensorReflection; compiles but does not read sensor

When setting up sensor with the sensor setup screen it works.

We are doing the same way we did it with the Mindstorm NXT but no success.
Any help on what's going on would be appreciated


Wed Jan 11, 2012 3:24 pm
Profile
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: setting up light sensor issues
Hi Joe,

How are you trying to read the sensor in your program? I tested your code and am getting appropriate values from the sensor debug window:


Attachments:
ROBOTC-2012-01-12_10.17.57.png
ROBOTC-2012-01-12_10.17.57.png [ 52.04 KiB | Viewed 1142 times ]

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support
Thu Jan 12, 2012 11:18 am
Profile
Rookie

Joined: Tue Aug 14, 2007 1:38 pm
Posts: 16
Post Re: setting up light sensor issues
Thanks for the reply. I have the exact same code as you showed but with no response on the debug sensor window. My students are just going through making sure they can set the different sensors and motors up since they just came off programming the NXT. The strange thing is we have no problems with setting up and reading other senser types - touch,sonar,quadencoders,etc. We have the PIC .5, running RobotC 3.04. I couldn't think of any settings that might cause it. Weird! For now we can set it up in the sensor/motor setup. I was just trying to have them use and learn programming as well as the robotics application. If you think of anything let me know.

Thanks


Thu Jan 12, 2012 1:39 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.