Go to Post Maybe you should whack it a few times with a hammer. That always seems to fix our robots. - Adam Y. [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 22-11-2014, 17:22
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Parallax PING))) Java Coding

Our team bought the Ping))) sensor for distance sensing. As per this forum post, we could use a PWM Y-cable to connect it to the digital sidecar. How do we code this in Java? I believe that the WPILib Ultrasonic class is meant for those sensors with an input and output.

The Ping))) has a built-in SX microcontroller with the job of generating the pulse and patiently waiting for that pulse to make it's way back. It then sends back a pulse, with a width that translates into the distance, by the multiplication of a specific constant, 2260 for centimeters and 890 for inches.

Note that the time units are in microseconds.

How do I send 30 microsecond pulse to a digital output and read back the input pulse, probably from a different pin if I use the Y-cable method?
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi