Search found 5 matches
- 01 Nov 2010, 16:13
- Forum: Mindstorms Software
- Topic: NXC Line Follower
- Replies: 9
- Views: 12053
Re: NXC Line Follower
As Morton mentions, the reason for calibrating a line follower is so that it works well in the current ambient lighting situation. If you will only run it in exactly the same lighting conditions as you test it in then you don't need calibration but usually that is not how things work in real life. ...
- 01 Nov 2010, 12:24
- Forum: Mindstorms Software
- Topic: NXC Line Follower
- Replies: 9
- Views: 12053
Re: NXC Line Follower
Now it works! #define LUMINOSITA_SOGLIA 35 task main() { SetSensorColorRed(IN_3); // Definisce il sensore 3 come sensore della luce OnFwd(OUT_AC, 75); while(true) { if (Sensor(IN_3) > LUMINOSITA_SOGLIA) { OnRev(OUT_C, 75); until(Sensor(IN_3) <= LUMINOSITA_SOGLIA); OnFwd(OUT_AC, 75); } } } Thank you ...
- 01 Nov 2010, 11:23
- Forum: Mindstorms Software
- Topic: NXC Line Follower
- Replies: 9
- Views: 12053
Re: NXC Line Follower
The color sensor cannot be used like the light sensor without some code changes. It isn't a light sensor so you can't simply configure the port to which it is connected for use with a light sensor. If you do that then the firmware treats the color sensor like it is the NXT 1.0/1.1 light sensor and ...
- 01 Nov 2010, 11:13
- Forum: Mindstorms Software
- Topic: NXC Line Follower
- Replies: 9
- Views: 12053
Re: NXC Line Follower
S2 != S3 -- In case you didn't get that: To make sure you don't encounter this problem be sure to declare a single constant. It makes your code easier to read, too: //#define PORT_LIGHT S3 //IN_3 is the NBC version //OR const byte PORT_LIGHT = S3; //IN_3 is the NBC version :shock: Right! This was a...
- 01 Nov 2010, 00:14
- Forum: Mindstorms Software
- Topic: NXC Line Follower
- Replies: 9
- Views: 12053
NXC Line Follower
Hi. I'm trying to use the Color Sensor like a Light Sensor with nxc. I tried the line follower wrote by Benedettelli on his tutorial Programming LEGO NXT Robots using NXC but it doesn't work. The robot (classic Quick Start of NXT 2.0 kit) go always straight and the light of the Light Sensor is alway...