Newping.h is missing



I'm trying to help Ambroise to installing MRL, but impossible to compile the MRLComm.ino into his Arduino Mega board .

The problem is that Newping.h is missing . I've tried with my arduino duemilanove board and same problem .

So i've downloaded Newping library and add it in my arduino's IDE for install the .ino (copy/paste from MRL gui) with it and this worked, but it must be a problem in MRL wink

Or maybe i've forget something ..

I'm attaching the library Newping  if someone need it . Just extract it and put the folder in the "library" folder of your arduino install folder.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
GroG's picture

BEETLEJUICE ! Your avatar


Your avatar makes me happy :)

Oops .. ya I was trying NewPing out .. but its way toooo SLOWWWWW 

up to 18K us ! - 

So I'll drop this dependency in the next release..  but Thank You ! for finding this and posting a solution !


beetlejuice's picture


Ok, Newping was for ultrasonic sensors,right ? so if you remove it, ultrasonic will stop to work ?

i'm talking about this script :


# variables dependent on your setup

boardType = "atmega2560"  # atmega168 | atmega328p | atmega2560 | atmega1280 | atmega32u4
comPort = "COM8" # com4 for atmega328 com8 for mega2560
trigPin = 22
echoPin = 23

# start Arduino service named arduino
arduino = Runtime.createAndStart("arduino", "Arduino")
arduino.setBoard(boardType) # atmega168 | mega2560 | etc
# Start UltrasonicSensor named sr04
sr04 = Runtime.createAndStart("sr04", "UltrasonicSensor")
sr04.attach(arduino, trigPin, echoPin)

# blocking examples
duration =
print duration
range = sr04.range()
print range

# non blocking - event example
# sr04.startRanging()
GroG's picture

Ya .. here is the history /

Ya .. here is the history / evolution

1. tried Arduino's pulseIn - too slow interfered with servo movement
2. tried NewPing in the hope that it would have better performance .. it did not.

So right now I don't want to use either pulseIn or NewPing, but I might put pulseIn back in until I re-write it with a much faster method.

Your fix should work with the script for version 1.0.27 if you or Amby want to experiment with it.

ambroise's picture

thank you for your help

thank you for your help beetlejuice

i cheking if i can find a tuto for learn

sse you