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) School edition × MBC SPIKE Blocks website

Read the SharpShot Vision with the MBC Blocks website in three steps

On the MBC SPIKE Blocks website, you do not need to import a library for the SharpShot. First, under "run once at start", tell the website which port the sensor is on. Then add the main loop. Last, put a reading block inside the main loop. Follow the steps on the left, and the blocks on the right grow with you. These block pictures were built and exported straight from the website, so they look the same as on your screen.

The website is only in Chinese, so its blocks are in Chinese. On this page every block comes with an English explanation, written as "Chinese block name (English meaning)", so you can find it on the screen. The website is free and needs no login. The hub needs Pybricks firmware (the website's "SPIKE 主機" (SPIKE hub) menu can install it for you).

1

Setup: which port the SharpShot is on

The first thing in the program is a "○ 埠 接 MBC 神攝手學校版" (port ○ is the MBC SharpShot School edition) block under the yellow "開機時執行一次" (run once at start). Then the website knows that port has a SharpShot.

Which port is the sensor on?
  1. Open the MBC SPIKE Blocks website and press "+" to start a new program.
  2. In the block list on the left, click "MBC 感應器" (MBC sensors) → "神攝手學校版" (SharpShot School edition). The first block is "○ 埠 接 MBC 神攝手學校版".
  3. Attach it under "開機時執行一次" and pick C in the drop-down.
2

Add the main loop

You read a sensor again and again, so you need the yellow "主迴圈(一直重複)" (main loop, repeat forever). Put a "等待 100 毫秒" (wait 100 ms) block in it first, so it reads every 0.1 s and not too fast.

  1. From "控制" (Control), drag out "主迴圈(一直重複)" and drop it in an empty spot under the setup block (they do not need to snap together).
  2. Drag a "等待 100 毫秒" block into the main loop.

The Python the website makes goes into a multitasking (async) program by itself. You do not choose it, and you do not write await.

3

Use the reading blocks

"MBC 感應器 → 神攝手學校版" also has 15 reading blocks (every function in the Pybricks library is there). Each one has a port drop-down in the middle: pick the same port as in step 1 (C). Click a function, and the blocks and the output change to its example.

Pretend sensor (what the camera sees): drag the blob and watch the output on the right

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. Green box = the blob the sensor is tracking (the colour you picked in "Setup 2: TRACK"). X: left 0, right 98. Y: bottom 1, top 75.

An example for every reading block

15 reading blocks, each with a set of blocks you can copy (port C). Press "Try it" to jump to step 3; the blocks and the output on the right change to that example.

Good to know

  1. You need only one setup block. Each port can be set up once. The reading blocks must use the same port as the setup block; if you pick a wrong port, the website warns you before it downloads.
  2. No library to download. When the website downloads your program, it sends the SharpShot reading code to the hub too.
  3. The same functions as the Pybricks library: every function in MBC_cam_school.py has a block here (found = "有找到色塊" (blob found), area = "色塊面積" (blob area), blob_xya = "色塊 [X, Y, 面積]" (blob [X, Y, area]), read_all = "8 個數字" (8 numbers)), and the values are the same. Unplugging does not stop the program: if the sensor cannot be read, you get the last value, and the terminal prints one warning line (in Chinese and English; it starts with MBC: Port). Plug it back in and it works again by itself. Use "感應器有接好" (sensor connected) to check the connection. Tick "Unplug the sensor" on the right to see this.
  4. Check that a blob is found first. When no blob is found, blob X, Y, width, height and area are all 0, which looks like "the blob is in the bottom-left corner". So check "有找到色塊" before you look at the position. "色塊 [X, Y, 面積]", the sensor ID and the firmware version are another data group in the sensor. "色塊面積", "色塊 [X, Y, 面積]" and the sensor ID need sensor firmware from 2026-10 or later (with older firmware the area is always 0).
  5. You set the colours on the sensor: hue looks at the sample point from "Setup 1: COLOR"; the blob is the colour from "Setup 2: TRACK". You can only set them with the buttons on the sensor. If you have not done Setup 1, hue is always 0, the same as red.
  6. Which way is which: stand behind the robot and look forward. X: left 0, right 98, centre about 50 (X − 50 is negative on the left, positive on the right). Y is small at the bottom and big at the top (bottom 1, top 75).