Hi all,
I am new to using netduino plus and am wondering why my parallax ultrasonic ping does nothing. I am using a tristate port to get the readings but there seems to be no variation in the data being read. My main question is how do i know if the sensor is working? I dont see the LED on the ping sensor light up (like shown in youtube arduino videos). Anyone who can share working c# code would help. I have attached a picture of my connection. please tell me if i am doing something wrong. I have a 5v connection, ground and am using digital pin 7.
netduino plus and parallax ultrasonic
Started by
manee
, Oct 13 2012 07:10 PM
3 replies to this topic
#1
Posted 13 October 2012 - 07:10 PM
#2
Posted 14 October 2012 - 01:36 AM
I have many of these working. Light should be lit. if it's getting power and detecting a ping back.(PS, don't see your attached diagram)
I am using the attached class as so:
Device defined, create event handler, and pause to allow the sensor to stabilize.
The Event Handler code:
I am using the attached class as so:
Device defined, create event handler, and pause to allow the sensor to stabilize.
Ping ping = new Ping(Pins.GPIO_PIN_D2, 1000, true); ping.RangeEvent += new Ping.RangeTakenDelegate(ping_RangeEvent); Thread.Sleep(60000);
The Event Handler code:
static void ping_RangeEvent(object sender, PingEventArgs e) { Debug.Print("Range: " + (e.Distance * 0.39).ToString() + " in"); }
Attached Files
#3
Posted 14 October 2012 - 01:37 AM
The netduino pins are 5v tolerant, so it should be able to get the response without damage. However, the output from the netduino is still going to be only 3.3v and that might not be enough to trigger the Ping. Do you have another Ping and oscilloscope? A second Ping with an oscilloscope attached to the output pin should be able the hear/see the first to let you know if it is triggering.
#4
Posted 22 May 2013 - 09:44 AM
Dave, did you write this code? If so, Thanks a lot
Works like a charm
Regards,
Skarphedinn.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users