Programming: Ultrasonic Sensor



  • I've ran the cod from learn robolink ultrasonic sensor and the output from from the serial monitor is posted below

    0_1623103737598_cdcee287-358c-40ea-9af2-6276475fb80a-image.png

    During the output my hand moving away and towards the sensor with no effect. I also noticed that output is slow so I've included the timestamps.

    Is there anyway to test if the ultrasonic sensor is defective? How can I test is the board is behaving correctly?

    None of the other tutorials in the Programming and Mouse section from learn.robolink.com have had any issues.

    Wiring shown below matches the link.

    0_1623104449747_111e2516-eec9-49c3-a947-36fe1d26733e-image.png

    0_1623104473089_4df592f1-6fe1-40b3-96bb-e54fd7757004-image.png


  • administrators

    Hello @msimon
    So it seems like some of the connections are incorrect
    please check out the pins echo and trig are connected in the following image
    0_1623274101715_4b87b58a-12bf-4548-ba23-565a2e5b2585-image.png
    they should be connected to 2 pins below the ones you have
    0_1623274298799_662315ba-5621-49ec-8d4e-a18274752ebc-image.png

    Let me know if that resolves your issue.


Log in to reply
 

Looks like your connection to Robolink community was lost, please wait while we try to reconnect.