How to read sensor values in mBlock 5


#1

Compared with mBlock 3, some user may be confused how to let the panda say the sensor values in mBlock 5. So this article will demonstrate that how to show sensor values on the screen in mBlock 5. It applies to mBot, Ranger, Codey Rocky and here I take mBot as an example.
In mBlock 5, we have two methods to see the value on the screen.
Step 1. Open mBlock 5 you have installed, connect USB from mbot to computer with USB cable, connect mBot , then do update firmware:
image

Step 2: method one
Tick the block you need and it will show the sensor values.


method two:
Code like below: (you need variable), sensor value will be on the left side:


If you want to let the Panda say out the value, go to Sprite, code like this and keep the codes under Ranger page running.


Light sensor and distance reading while in motion
Light sensor value - blocks used in mblock5...?