Legacy edition, no longer supported: SharpShot Vision units shipped before 2026-10 (School and WRO editions) are no longer supported; their guides and examples stay here for reference. To upgrade to the current SharpShot Vision, contact the distributor you bought it from and send it back: the firmware update is free, and the buyer pays shipping both ways. Looking for the current SharpShot Vision? →
MBC SharpShot Vision WRO edition (HUE12) × EV3 clev3r

Read the SharpShot WRO edition with clev3r in three steps

A clev3r (EV3 BASIC) program goes in this order. First create the project and pick the port. Then set the sensor mode. Last, read values and show them on the EV3 screen. Follow the steps on the left, and the program on the right grows with you. Click the boxes in the simulated camera picture to change colours to see what the EV3 screen shows.

1

Create the project, pick the port

clev3r needs no extension and no files to import. On the EV3, the sensor uses its own sensor type 95 (HUE12), so you read it with the normal Sensor commands. The first line, folder, sets the folder the program goes into on the EV3.

  1. Install clev3r (we tested version v1.7.1.0).
  2. Turn on the EV3 first. Then plug the sensor into the port you pick below.
  3. Make a new program and write the lines below.
  4. Press "Compile and download". On the EV3, open the file menu and run it from the folder that starts with MBC_.
Which port is the sensor on?

The first number in the program (for example Sensor.SetMode(1, 0)) is the port. 1~4 are the EV3 ports 1~4.

2

Set the mode

The sensor has several "modes". Each mode sends back a few numbers at once. Sensor.SetMode(port, mode) picks one. Use only one mode in a program: the EV3 needs about 0.5 s every time it changes mode.

Pick a mode (if you pick a reading from another mode in step 3, this changes too):

3

Read and show on the screen

Sensor.ReadRawValue(port, which one) takes one number from the current mode (counting starts at 0). LCD.Text writes it on the EV3 screen. The EV3 screen can only show English letters and numbers, so the labels are short English words. Click a reading, and the program and screen change to its example.

Simulated camera picture (12 points in a row): click a box to change its colour and watch the output on the right
Colour to paint (pick a colour, then click a box above):

This picture is only an illustration: each colour uses one sample number. Real hue and saturation change with the light and the object. You set the positions of the 12 points on the sensor; here they sit in a row so they are easy to see (point 1 is on the far left). The red frame = point 1, which the examples read. The number under each box is the hue the program reads.

An example for every reading

Full examples


        

!


        

!


        

!

Good to know

  1. 3 bytes are packed in each number. Mode 0 sends 8 numbers, and the "colour code, saturation" of the 12 points make 24 bytes. Point N has its colour code in byte 2×(N−1) and its saturation in the next byte. Divide the byte number by 3: the answer is which number, and the remainder 0, 1 or 2 means divide by 1, 256 or 65536 first, then take the remainder of 256 (see the "S1 to S4" example).
  2. Unplugged = 0. In clev3r, Sensor.ReadRawValue gives 0 when there is no data, and the program keeps running. To check the cable, use Sensor.GetType from the "Is the sensor plugged in?" card (95 when plugged in). Tick "Unplug the sensor" on the right to try it.
  3. Reading the colour code: 0 to 239 are colours (red is at both ends: 0–9 and 230–239), 240 to 245 white, 246 to 250 black, 255 = this point is not set.
  4. The EV3 screen only shows English letters and numbers. Use short English labels in LCD.Text (for example S1, T1). Add a few spaces at the end to cover a longer number from last time.