Go Down

Topic: NewPing Library on Arduino Due (Read 1 time) previous topic - next topic


My apologies if this has been discussed.  I was not able to find elsewhere.
I will be using four Ping))) sensors to guide my robot.  I found the NewPing library and found it works great on a Uno.  When I attempt to use on my Due, which is the board that will control my 'bot, I receive an error message.  Is there a way around this?  The NewPing library has some sweet functionality.

Thanks in advance


"I recieve an error message" is unhelpful, particularly when it should only be a copy-paste for you to give us the exact text of the error message.

Have you found any other examples online of successful DUE users of these sensors?
"The problem is in the code you didn't post."


Well, the errors are going to be about AVR-only timer registers, since NewPing uses AVR timer2 or timer4.

I ported NewPing to Teensy 3.1 several months ago, using IntervalTimer.  That probably won't help much for Arduino Due, since Due doesn't have IntervalTimer in its core library.  But at least it can show that NewPing does work on 32 bit ARM if the timer stuff is converted to whatever timers your chip has.

Go Up