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 (School edition) × MATRIX Mini R4 (MATRIXblock)

Read the SharpShot Vision (School edition) with MATRIXblock in three steps

In MATRIXblock, the software for the MATRIX Mini R4, the SharpShot Vision (School edition) shows up as an mVision camera (serial port), so the built-in mVision blocks can read it and no library is needed. First put MVision Begin in Setup of "Mini Begin", then MVision Polling in Loop, and finally the MVision data blocks in its "Data Available" part. Follow the steps on the left and the blocks on the right build up; these pictures are drawn by MATRIXblock's own block code, so they look the same as in the software.

MATRIXblock is the free block software from MATRIX (installed in C:\matrixblock-r4\ by default). Buy the MATRIX edition of the sensor and plug it into the Mini R4 serial port used by the mVision camera.

1

Set up: start mVision

On the MATRIX, the SharpShot Vision (School edition) acts as an mVision camera on the serial port, not I2C. The first thing in the program is "MVision Begin" inside "Setup" of the blue "Mini Begin" block.

Wiring: plug the sensor into the Mini R4 serial port used by the mVision camera (Serial1, 115200). There is no port to pick.

  1. Open MATRIXblock. A new project already has a blue "Mini Begin" block (if not, drag one from the "Mini Core" category).
  2. Click the "Sensing" category and find "MVision Begin".
  3. Put it inside "Setup".
2

Put "MVision Polling" in the loop

"MVision Polling, Data Available" waits for the next packet from the sensor. When one arrives it runs the top part; if nothing comes (about 0.5 seconds) it runs "Not Available". So the loop needs no extra wait.

  1. Drag "MVision Polling, Data Available / Not Available" from "Sensing" into "Loop".
  2. Inside "Not Available", add "USB Serial Print No data received with New Line" (in the "Serial" category), so you can see when it is unplugged.

Leave "UART: On" and "Baud: 9600" on "Mini Begin" as they are: the examples use "USB Serial Print … with New Line" to show values in the Information Window (set the Information Window to 9600 too).

3

Use the MVision data blocks

The "MVision 0 Data" block in "Sensing" picks a data slot in its dropdown; each slot is one value from the SharpShot Vision (School edition). The example goes inside the "Data Available" part. Click a function and the blocks and output change to its example.

Simulated sensor (what the camera sees): drag the blob and watch the output change

The pretend picture is only a guide: the numbers are simplified, and a real sensor can be a few steps off because of the light. Cross = sample point (the spot you picked on the sensor in "Setup 1: COLOR"); hue is read at the cross and is 255 when there is no colour there. Green box = the blob the sensor is tracking (the colour you picked in "Setup 2: TRACK"). X: left 0, right 100. Y: bottom 0, top 75.

An example for every reading

11 examples you can copy block by block; they go inside the "Data Available" part of "MVision Polling". Press "Try it" to jump to step 3; the blocks and output on the right change to that example.

Things to know

  1. Wiring: plug the SharpShot Vision (School edition) into the Mini R4 serial port used by the mVision camera (Serial1, 115200), not an I2C port. Use only the "MVision" blocks, not the colour sensor blocks.
  2. Set it up on the sensor first: pick the sample point and tracking colour with the screen and buttons on the back of the sensor (short-press the side button for the menu). No computer needed; the settings are saved.
  3. Use data 0 to 9 only, never 10: the MATRIX program only sets aside 10 slots (data 0 to 9). The "10" in the dropdown reads some other memory.
  4. When it is unplugged: "MVision Polling" waits about 0.5 seconds, then runs the "Not Available" part; the data stays at the last values received. This product uses the serial port, so do not use the colour sensor blocks.
  5. Same as the EV3 / SPIKE version: the value ranges are the same as on EV3 and SPIKE, so your program ideas carry over.