Shop OBEX P1 Docs P2 Docs Learn Events
Parallax Ultrasonic Sensor and Sharp GP2Y0A02YK0F IR Distance Sensor — Parallax Forums

Parallax Ultrasonic Sensor and Sharp GP2Y0A02YK0F IR Distance Sensor

I am currently using Parallax Ultrasonic Sensor and Sharp GP2Y0A02YK0F IR Distance Sensor with ARDUINO UNO microcontroller to make an obstacle avoidance device for the blind. I will like to test both sensors at the time to make sure I am getting the same readings with both. They both work when I test them separate. Any one has an Idea of how to implement them together? I will attach what I have for each of the sensors. I also using a piezo buzzer to let the user know whenever an object is approaching. My maximum range is 130cm and minimum is 0. Thanks a lot for the support.

Comments

  • Any one has an Idea of how to implement them together?

    I don't see a reason why the two programs couldn't be merged. It looks like the easiest thing would be to copy the IR program into the Ultrasonic program. Copy the start variables and the contents of the loop function. It looks like the setup function for both programs are the same so that wouldn't need to be changed.

    You'll probably want to add some extra text output so you can tell which data sets corresponds to which sensor.
Sign In or Register to comment.