January 19, 2017 at 10:08 am #4101JamesParticipant
I have recently purchased an ultrasonic range finder to use with the Crumble controller. I am having an issue programming the the range finder to work with the Crumble. I am not sure whether it is something to do with how I have wired the crumble up or whether it is something to do with the program I have created.
Please see the attached images which show my wire set up and the program.
JamesFebruary 22, 2017 at 4:53 pm #4207MikeParticipant
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.
Attachments:You must be logged in to view attached files.
- You must be logged in to reply to this topic.