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.

Example

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.

Example

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.


results matching ""

    No results matching ""