Ultrasonic Sensor

 

You can connect the [Ultrasonic Sensor] block of mbuild to Halocode, and make more creations.

 

1. ultrasonic sensor (1) distance to an object(cm)

Reports the distance of an object detected by the specified ultrasonic sensor, measured in centimeter.

1.png

 

Example

2.png

When the button of Halocode is pressed, the distance of obstacle detected by ultrasonic 1 will be displayed on blue LED matrix 1.


2. ultrasonic sensor (1) outside the distance range?

If an object is outside the detecting range of the specified ultrasonic sensor, the report condition is met.

3.png

 

Example

4.png

When the button of Halocode is pressed, if the obstacle is outside the range of ultrasonic sensor 1, the LED ring of Halocode will light up red.


Was this article helpful?
2 out of 2 found this helpful

Comments

0 comments

Please sign in to leave a comment.