Home 2018 Forums Crumble Support Making the Ultrasonic Range Finder to work with Crumb;e Reply To: Making the Ultrasonic Range Finder to work with Crumb;e

#4207
Mike
Participant

Hi James,

I cant see the attached images for some reason.

If your sensor is the standard HC-SR04 then all you need to do is to connect GND to ground, VCC to +ve, and Trigger and Echo to two of the I/O pads A, B. C or D. You will need a battery to power the sensor as well.

Then use the Input/Output block to get a value from the sensor, setting T(rigger) and E(cho) to the correct I/O pads.

If you save the value into a variable then you should see it change as you wave things in front of the sensor. The number is approximately the distance in cm.

Good luck

Mike

Attachments: