setting up light sensor issues
Page 1 of 1

Author:  joetrotter [ Wed Jan 11, 2012 3:24 pm ]
Post subject:  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

Author:  jbflot [ Thu Jan 12, 2012 11:18 am ]
Post subject:  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:

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

Author:  joetrotter [ Thu Jan 12, 2012 1:39 pm ]
Post subject:  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.


Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group