Sonar sensor for my apm

Hi guys thank u for taking ur tme reading my forum.i have problem using my sonar sensor.

type of sonar sensor i usig is XL-maxsonar EZ/AE. i cannot upload the programme. Do you guys got any other programme to find the distance using the sonar sensor? I have try ping in arduino examples.

Anyone pls help me. Its really appreciated

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • may i know what is higets value can b shown on serial monitor?

    i only get 30cm. it is my highest no.

  • ok thx. i hope get the result soon

  • Moderator

    I wrote my own, a little different, but here is what most people start with: arduino maxbotix example

     

    One thing you want to be careful of here is that the example converts from raw to inches, and then converts inches to cm. So that is kind of silly.

     

    The code in ArduCopter uses Analog. PW is a blocking call, and all UARTs are in use. You will need to figure out which pin you want to use. 

  • Moderator

    Re-load ArduCopter

    Connect the sensor as seen here

    Go to CLI-> test

This reply was deleted.

Activity