- This topic has 1 reply, 2 voices, and was last updated 6 years, 9 months ago by
Mike.
-
AuthorPosts
-
January 19, 2017 at 10:08 am #4101
James
ParticipantI 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.
Many Thanks
James
February 22, 2017 at 4:53 pm #4207Mike
ParticipantHi 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:
-
AuthorPosts
- You must be logged in to reply to this topic.