|
In lugnet.robotics.rcx.nqc, Iain Hendry wrote:
>
> int threshold;
> task main()
> {
> SetSensorType(SENSOR_1, SENSOR_TYPE_LIGHT);
> OnFwd(OUT_A);
> threshold=SENSOR_1;
> until(SENSOR_1<threshold-5);
> Off(OUT_A);
> }
>
>
You should check to make sure your light sensor is in fact changing more than 5
counts. Start by changing the above code to 2 or 3.
I don't recall with NQC, but with some languages (BrickOS) the values are
backwards, so you may need to check for SENSOR_1>threshold+5.
Another quick test is to try a different light sensor.
Steve
|
|
Message is in Reply To:
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|