Code Monkey home page Code Monkey logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
[deleted comment]

from arduino-new-ping.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
[deleted comment]

from arduino-new-ping.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 18, 2024
#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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.