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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4101
    James
    Participant

    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.

    Many Thanks

    James

    #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:
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.