Comments (6)
I've not experienced this issue nor has it been reported previously. I would
try to change the PING_MEDIAN_DELAY value in the NewPing.h file. This sets the
time delay between pings. The delay(50) that you're using is between groups of
pings, not between the 5 pings sent during a ping_median(). Changing this to
50000 microseconds is a good starting point to diagnose a problem. My guess is
that the particular sensor you are using needs slightly more time between pings
to reset. It's still odd that it would freeze, as even if I set that value to
1000 it won't freeze for me.
Original comment by eckel.tim
on 15 Jul 2013 at 1:09
from arduino-new-ping.
[deleted comment]
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.
I am currently experiencing the same issue.
I am working on a obstacle sensing bot using 2 motors on a Tamiya double
gearbox tracked chassis being driven by a second power source (6 AAA)
batteries) and a L293D H Bridge as a controller. The 5v source on my Arduino
Uno V3 is powering the H Bridge, a mini servo (with a 100uF capacitor), and a
HC-SR04 ultrasonic sensor. I am using pin 8 for both the TRIGGER and ECHO.
I have only experienced system freezes when the bot is in 'Drive' mode.
During this time the code :
1) sets the speed on the 2 (Left & Right) Enable pins on the H Bridge.
2) calls myServo.ping_median(5).
3) evaluates the resulting range.
4) stops the bot if a collision is about to occur.
This loop runs about once every 50ms
It gets through between 3 and 20 loops before a call to myServo.ping_median()
hangs the system (i have tried args of 3 and 5). sometimes, but not always,
the hang is so severe that the Uno drops the serial connection to the monitor.
The motors, however, always keep running.
I have yet to experience this failure if I replace the call to ping_median()
with ping(). Although this is undesirable since the resulting ranges are
fairly inaccurate and frequently cause the bot to 'see' obstacles which do not
exist.
Original comment by [email protected]
on 12 Jun 2014 at 5:20
from arduino-new-ping.
#5 craig.n... Describes my dilema exactly. All problems disappear when using
just ping, but with ping_median, the processor hangs in mid air and has to be
reset. I've tried increasing ms to 50 from 29 in newping.h to no avail. ????
Original comment by [email protected]
on 16 Jun 2015 at 5:54
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
- ProblemMessure on cm HOT 6
- check_ping() doesn't indicate difference between timeout and still-waiting HOT 3
- Ping readings vary wildly 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.