Comments (6)
Finally i change on the NewPing.h the bellow:
#define US_ROUNDTRIP_CM 29 //57 // Microseconds (uS) it takes sound to
travel round-trip 1cm (2cm total), uses integer to save compiled code space.
And now measure correct, please confirm if that effect only to this
sonar.ping_cm() or it is for other subs too.
Thank you in advance.
Best Regards,
Tasos
Original comment by [email protected]
on 2 Jan 2013 at 8:15
from arduino-new-ping.
You changed US_ROUNDTRIP_CM from 57 to 29 and your result is now 10cm instead
of 5cm but your modification is wrong because sound needs more than 29
microseconds to travel 2cm.
Original comment by jrizzo
on 4 Jul 2013 at 7:01
from arduino-new-ping.
Testing NewPing and Ultrasonic I get different values. Ultrasonic result is
correct (299cm) but NewPing is wrong (306cm). If I change US_ROUNDTRIP_CM from
57 to 58 I get the same result with both libraries.
Original comment by jrizzo
on 4 Jul 2013 at 7:07
from arduino-new-ping.
It depends on your temperature. For me, 57 is more accurate which is why it's
the default. I made it easily user configurable so each user could set the
value they wanted for their environment. Also, if accuracy is something you
need, you shouldn't be using the ping_cm() method at all. It's designed to be
quick, small, and accurate for most people. But, if you need better accuracy,
use the ping() method, a temperature sensor, and your own logic to convert time
to distance based on the current temperature, altitude, humidity, etc.
Original comment by eckel.tim
on 15 Jul 2013 at 2:01
from arduino-new-ping.
[deleted comment]
from arduino-new-ping.
Please report this in a more appropriate place.
Original comment by eckel.tim
on 19 Sep 2013 at 6:58
- Changed state: Invalid
from arduino-new-ping.
Related Issues (13)
- Program copied and pasted, will not verify or upload. HOT 4
- Not compatible with tone ( ) function. HOT 2
- Can't tell difference between still waiting and ping timeout HOT 1
- object moving faster than ping leaves old reading HOT 1
- Missing one pin detection code causes erroneous trig output HOT 1
- check_ping() doesn't indicate difference between timeout and still-waiting HOT 3
- Ping readings vary wildly HOT 6
- ping_median seems to freeze a lot HOT 6
- New Ping got issues with tone(); HOT 2
- Doesn't work with Arduino Robot HOT 3
- Encompatible with adafruit motor shield HOT 1
- Incompatibility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-new-ping.