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 (ESP32CAM) WRO edition (HUE12) × micro:bit (MakeCode)

Read the SharpShot WRO edition with a micro:bit in three steps

In MakeCode for micro:bit, first add the MBC extension, then wait for the camera in "on start", and last put a spot reading block into "forever". Follow the steps on the left, and the blocks on the right grow with you. The block pictures come from MakeCode's own renderer, so they look the same as in the editor. Switch to JavaScript at the top right, just like the switch in MakeCode.

MakeCode is free and needs no login. Open it in Chrome or Edge. Click "Download" to save a .hex file and drag it onto the micro:bit.

1

Add the MBC extension and wire it up

The micro:bit does not know the SharpShot yet. After you add the MBC extension, an "MBC Sensors" category appears. The WRO edition uses the "camera spot" blocks in its "Camera" group. Pick your micro:bit version first; the hardware check below changes with it.

Which micro:bit do you have? (V2 has "V2" printed on the back)
  1. Open MakeCode and click "New Project".
  2. At the bottom of the toolbox, click "Advanced" → "Extensions".
  3. Paste https://github.com/contactmbcrobot/pxt-mbc-sensors into the search box, press Enter and click mbc-sensors.
  4. The blocks are in English. (Traditional Chinese is also included in the extension.)
2

On start: wait for the camera

The camera needs a few seconds to start. The program first waits until it is ready: tick = connected, cross = not connected. You find wiring problems at once.

I2C address of the sensor
  1. From "Logic", drag "if … then … else" into "on start".
  2. From "MBC Sensors" → "more", drag "wait for device at … ready, timeout … ms" into the condition. Pick 76 (0x4C) and type 3000.
  3. From "Basic", drag two "show icon" blocks: one tick, one cross.
  4. Put "pause 100 ms" into "forever".

3

Use the spot blocks

On the WRO edition you set 12 spots (S1–S12) on the camera. The "camera spot …" blocks read the colour code and vividness of each spot. The "Device" group has shared blocks that every MBC sensor has. Pick one, and the blocks and the output switch to its example.

Simulated camera picture (12 spots 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):

The simulator is only a picture: each colour uses one sample number, and real colour codes and vividness change with the light and the object. You set the positions of the 12 spots on the camera; here they sit in a row so they are easy to see (spot 1 is on the far left). The red frame = spot 1, which the examples read. The number under each box is the colour code the program reads.

An example for every block

Every spot block and every Device block has an example you can copy (address 0x4C, spot 1). Click "Try it" to jump to step 3, and the blocks and output on the right switch to that example.

Good to know

  1. Unplugging does not stop the program: when the camera cannot be read, reading blocks return 0, and nothing is printed; "camera spot … is …" returns false for colour, white, black and off alike (extension v2.0.5 and later). Careful: colour code 0 is inside the "colour" range (0–239), so the colour code alone looks like red. Tick "Unplug the sensor" below and try it: the "is …" example falls through to the end and prints off. Use "device at … is ready" first to make sure the camera is connected.
  2. Reading the colour code: 0–239 = a colour (red is at both ends: about 0–9 and 230–239), 240–245 = white, 246–250 = black, 255 = this spot is off. Vividness is 0–255; bigger = more vivid. Black is 1, and a spot that is off is 0.
  3. Spots are set on the camera: you set the position of the 12 spots, and turn them on or off, with the buttons on the camera. While the camera is in its menu, all 12 spots read 255.
  4. The School-edition blocks do not work on the WRO edition: "camera blob is found", "camera blob …", "camera colour …" and "camera motion" all read 0 (true/false blocks return false). Use only the spot blocks with the WRO edition. The School edition has its own tutorial page.
  5. The camera is an ESP32: it cannot make the micro:bit wait (no clock stretching). The extension already waits 2 ms after writing the value id, so you do not need an extra pause.