Shop OBEX P1 Docs P2 Docs Learn Events
need help programming PING))) sensor in C — Parallax Forums

need help programming PING))) sensor in C

PompRockerPompRocker Posts: 1
edited 2008-07-10 01:37 in General Discussion
I have a robot using an MCU with ATMega8 programmed in C, I want to implement the PING))) sensor, can anyone help with this?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-10 01:27
    First, do you understand how the PING))) sensor works? If not, you need to download the documentation for it and look at it in detail.
    You also have to carefully go through your C manual for the ATMega8 and make sure that your C system allows you to use the same I/O pin for both output and input (and see how to do that). You need to know how to produce a 2-5us pulse and how to time a received pulse anywhere from 115us to 18.5ms. I can't help you with those pieces. They're dependent on the ATMega8 and your C system.
  • FranklinFranklin Posts: 4,747
    edited 2008-07-10 01:37
    If you go to the Arduino site they have some code for using the ping with it (ATMega168)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.