Robojoy challenge class

5-2-1 Basic characteristics of the color sensors

  • Page:
  • 1
  • 2
  • 3
  • 4

Program that uses a color sensor

So I will try to make a program that uses a color sensor.
In order to use the color sensor with NXT software, you must have a block called "color sensor."

If there is no "color sensor block", it is necessary to extend the functionality of NXT software.
Please download the file from opening the download page of the official website of the LEGO Education, called "ColorSensor.zip" and click the part called "Color Sensor Block" (if you already have the extend "color sensor " block, the download is not required).

Expand the file "ColorSensor.zip" and remove the "Japanese Color Sensor 2_x.zip" from it. You expand it further (to expand the Zip file, you can deploy and use Lhaplus. Just do right-click on Windows7).
Then, starts the NXT software, select the menu "Import and Export Wizard block ", specify the directory that contains the files that has extracted. If the import is successful, the block of the "color sensor" will be added in the palette.

I've come up the most simple program (Program-1.rbt) with a "color sensor" block,. Reads the color in the color sensor that is connected to port 1, will show on the LCD. As a result of measurement, it will return the numeric value of 1-6.

Since the display result of numbers are confusing, so I tried to make a modified version (Program-2.rbt). Here rather than numeric displays colors instead.

  • Page:
  • 1
  • 2
  • 3
  • 4