Pages: 1 ... 28 29 [30] 31 32 ... 34   Go Down
Author Topic: NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.5  (Read 109699 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey thanks for the prompt response..

My problem is that I am using a waspmote, not arudino (although are almost the same, but have their own API etc).

So I really can't use this and I am not having a lot of time right now to even look into understanding it and try to port it to waspmote smiley-sad

Thanks anyway
Logged

Toledo, OH
Offline Offline
God Member
*****
Karma: 35
Posts: 508
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey thanks for the prompt response..

My problem is that I am using a waspmote, not arudino (although are almost the same, but have their own API etc).

So I really can't use this and I am not having a lot of time right now to even look into understanding it and try to port it to waspmote smiley-sad

Thanks anyway

Oh, this is an Arduino forum.  If your microcontroller isn't ATmega8, you're not going to get a lot of help here.  If it is ATmega8, then NewPing should work.

Tim
Logged

Arduino - Teensy - Raspberry Pi
My libraries: NewPing - LCDBitmap - toneAC - NewTone - TimerFreeTone

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey there again,

Most of the arduino code works almost seamlessly on the waspmote. It runs ATMEGA1281.
Logged

Toledo, OH
Offline Offline
God Member
*****
Karma: 35
Posts: 508
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey there again,

Most of the arduino code works almost seamlessly on the waspmote. It runs ATMEGA1281.

Then why would you think NewPing wouldn't work?  It's designed to run on the ATmega platform.

Tim
Logged

Arduino - Teensy - Raspberry Pi
My libraries: NewPing - LCDBitmap - toneAC - NewTone - TimerFreeTone

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I would like to use 12 x HC-SR04 with an I/O multiplexer  MCP23017 (or other) and NewPing library.
Is it possible ?
If yes, how do we configure the newping trigger et echo of the library?
If not, what solution to use knowing that I do not have enough I/O port?

Thank you in advance for your information
Logged

Toledo, OH
Offline Offline
God Member
*****
Karma: 35
Posts: 508
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I would like to use 12 x HC-SR04 with an I/O multiplexer  MCP23017 (or other) and NewPing library.
Is it possible ?
If yes, how do we configure the newping trigger et echo of the library?
If not, what solution to use knowing that I do not have enough I/O port?

Thank you in advance for your information

First, you only need 12 pins to control 12 HC-SR04 sensors using NewPing.  So, using an I/O multiplexer may not even be required.  Secondly, you can't use NewPing with an I/O multiplexer as it uses direct port register calls.  If you don't have 12 available pins to control 12 sensors, you'll either need to use a Adruino Mega or develop your own custom sensor library or sketch to interface with your I/O multiplexer.

Tim
Logged

Arduino - Teensy - Raspberry Pi
My libraries: NewPing - LCDBitmap - toneAC - NewTone - TimerFreeTone

Offline Offline
Full Member
***
Karma: 1
Posts: 109
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In the multiple sensor examples, how do I actually call up the data for the individual sensors to use that data?  For instance, I might want to compare the first sensor to the second, or the first to the third, or figure out which sensor has the highest or lowest reading.

Logged

Toledo, OH
Offline Offline
God Member
*****
Karma: 35
Posts: 508
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In the multiple sensor examples, how do I actually call up the data for the individual sensors to use that data?  For instance, I might want to compare the first sensor to the second, or the first to the third, or figure out which sensor has the highest or lowest reading.

Please see the 15 Sensors Example Sketch Help.  Everything is detailed in that post.  Basically, everything is stored in an array so you can easily extract the information you want.  The above linked help message will explain everything and gives alternative code to accomplish different tasks.

Tim
« Last Edit: April 11, 2014, 10:14:51 am by teckel » Logged

Arduino - Teensy - Raspberry Pi
My libraries: NewPing - LCDBitmap - toneAC - NewTone - TimerFreeTone

Offline Offline
Full Member
***
Karma: 1
Posts: 109
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Got it working on my obstacle avoidance robot with three SR04 sensors up front and it is working very well.   Great improvement.

My apologies for an unnecessary question.  I needed to brush up on arrays.
« Last Edit: April 13, 2014, 10:27:38 am by Northof49 » Logged

Toledo, OH
Offline Offline
God Member
*****
Karma: 35
Posts: 508
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Got it working on my obstacle avoidance robot with three SR04 sensors up front and it is working very well.   Great improvement.

The "multi-tasking" or maybe I should correctly stay "event-driven" or "task-switching" method of pinging even one sensor that NewPing uses is a vast improvement over other methods.  Using multiple sensors multiplies this improvement.  Glad it's working for you!

Tim
« Last Edit: April 11, 2014, 10:16:51 am by teckel » Logged

Arduino - Teensy - Raspberry Pi
My libraries: NewPing - LCDBitmap - toneAC - NewTone - TimerFreeTone

Brooklyn, NY
Offline Offline
Newbie
*
Karma: 0
Posts: 39
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Teckel thank you for this library contribution. Is it possible to use this with an ultrasonic sensor like the Hagisonic HG-M40DAI? Its signal output timing is from rising edge of input pulse (trigger) to rising edge of output pulse (echo). In other words, almost the reverse of sensors like Ping.

Datasheet: http://www.robotshop.com/media/files/pdf/hagisonic-anibat-data-sheet.pdf.

If you're curious why the Hagisonic sensor, this "AniBat" model has the unique advantage (AFAIK) of an extremely wide field of view - 180°.

Thanks,

Eric
Logged

Toledo, OH
Offline Offline
God Member
*****
Karma: 35
Posts: 508
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Teckel thank you for this library contribution. Is it possible to use this with an ultrasonic sensor like the Hagisonic HG-M40DAI? Its signal output timing is from rising edge of input pulse (trigger) to rising edge of output pulse (echo). In other words, almost the reverse of sensors like Ping.

Datasheet: http://www.robotshop.com/media/files/pdf/hagisonic-anibat-data-sheet.pdf.

If you're curious why the Hagisonic sensor, this "AniBat" model has the unique advantage (AFAIK) of an extremely wide field of view - 180°.

Thanks,

Eric

It sounds like it's similar to the URM37 sensor (hi/low switched).  I'm sending you a private message that may help.

Tim
Logged

Arduino - Teensy - Raspberry Pi
My libraries: NewPing - LCDBitmap - toneAC - NewTone - TimerFreeTone

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I am using 3 HC-SR04 sensors. I tried the sketch but it doesnt even print out anything. What should I do
Logged

Toledo, OH
Offline Offline
God Member
*****
Karma: 35
Posts: 508
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I am using 3 HC-SR04 sensors. I tried the sketch but it doesnt even print out anything. What should I do

Check your settings and sketch, as I'm 101% sure it works.  Thousands have used it.  Maybe you don't have the serial baud rate set correctly to match the sketch?

Tim
Logged

Arduino - Teensy - Raspberry Pi
My libraries: NewPing - LCDBitmap - toneAC - NewTone - TimerFreeTone

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

little confused on the "code.google" site changes.  are the "issues" you marked as done going to have the changes in the next version?  also, why remove that issues list?  it seems a very effective way to track features and bugs.  the forum thread is kind of overwhelming, and very difficult to track any issues on.
Logged

Pages: 1 ... 28 29 [30] 31 32 ... 34   Go Up
Jump to: