Mindstorms Sensor

How could i use lejos for legos mindstorms to use a colorlight sensor to follow a straight black line?

Hi Josh,

[01] I couldn’t find technical information about your color sensor (a link to a datasheet would be helpful), so I will assume that it works on the same principles as most of the hobby color sensors.

[02] Typically, robots that are designed to follow black line use two (2) optical sensors fixed some distance apart. Each sensor’s output is proportional to the amount of light which is reflected from under the sensor; line reflects less than the floor. When the robot is on the line, the sensors are located somewhat symmetrically on either side of the line, and their outputs are the same (or close). When the robot drifts off the line slightly, one sensor sees more line that other, the difference between their outputs increases, and the robot can take corrective action (e.g. turn to get back on the line).

[03] The method described in [02] typically uses IR LED(s) and photodiodes or prototransistors. But it could be done with two (2) color sensor as well.

[04] You could use a single color sensor, if you can modify the design of your line, and have blue and red lines running next to each other. When the robot deviates from the line, the color sensor would see increase in either red or blue.

Hope it helps!

- Nick

Currently Available on eBay

LEGOS - MINDSTORMS 9V MOTOR WITH SENSOR AND  CONNECTORS
LEGOS - MINDSTORMS 9V MOTOR WITH SENSOR AND CONNECTORS
Paypal   £18.83
  LEGO Technic Mindstorms ultrasonic sensor
LEGO Technic Mindstorms ultrasonic sensor
Paypal   £1.00
LEGO Mindstorms Sound Sensor 9845 BRAND NEW Sealed
LEGO Mindstorms Sound Sensor 9845 BRAND NEW Sealed
Paypal   £19.99
LEGO® MINDSTORMS® NXT Touch Sensor Fast Dispatch
LEGO® MINDSTORMS® NXT Touch Sensor Fast Dispatch
Paypal   £8.99
LEGOS - MINDSTORMS 9V MOTOR WITH SENSOR AND  CONNECTORS
LEGOS - MINDSTORMS 9V MOTOR WITH SENSOR AND CONNECTORS
Paypal   £18.83
Lego Mindstorm 8527/8547 2.0  NXT Touch Sensor 53793
Lego Mindstorm 8527/8547 2.0 NXT Touch Sensor 53793
Paypal   £7.95
LEGO Technic Mindstorms  9V Electric Touch Sensor Brick 3 x 2 - 879
LEGO Technic Mindstorms 9V Electric Touch Sensor Brick 3 x 2 - 879
Paypal   £3.49
Gyroscopic Sensor for LEGO® MINDSTORMS® NXT Gyro Sensor for LEGO NXT Robot
Gyroscopic Sensor for LEGO® MINDSTORMS® NXT Gyro Sensor for LEGO NXT Robot
Paypal   £37.20
Infrared Seeking Sensor for LEGO® MINDSTORMS® NXT IR Seeker for LEGO NXT Robot
Infrared Seeking Sensor for LEGO® MINDSTORMS® NXT IR Seeker for LEGO NXT Robot
Paypal   £37.20
Lego Mindstorms NXT 2.0 Software, Color Sensor and Color Sphere Balls 8547  New
Lego Mindstorms NXT 2.0 Software, Color Sensor and Color Sphere Balls 8547 New
Paypal   £46.20
   1

And a selection of products from Amazon

Compass Sensor for MINDSTORMS® NXT Compass Sensor for MINDSTORMS® NXT

Sale Price: £59.95

 

Description

Measures the earth's magnetic field and outputs a value representing the current heading

LEGO 8547 Mindstorms NXT 2.0 Robot LEGO 8547 Mindstorms NXT 2.0 Robot

Sale Price: £289.00

 
Lego MindStorms Temp Sensor ITEM 9889 Lego MindStorms Temp Sensor ITEM 9889

Sale Price: £7.99

 
Core Lego Mindstorms: Programming the RCX in Java Core Lego Mindstorms: Programming the RCX in Java

List Price: £31.99
Sale Price: £18.26
You save: £13.73 (43%)

 

Testing the Mindstorms NXT Laser Target Sensor