Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   FIRST Tech Challenge (http://www.chiefdelphi.com/forums/forumdisplay.php?f=146)
-   -   Programming ultrasonic sensor in MPlab (http://www.chiefdelphi.com/forums/showthread.php?t=47298)

AdamHeard 09-05-2006 00:07

Programming ultrasonic sensor in MPlab
 
Hi,
I'm trying to program a vex controller with MPlab and I can't seem to figure out how to program the utlrasonic sensor.

I understand the concept that (speed of sound x return time)/2 = distance but how do I implement it.


I know C syntax and have programmed FRC before, and vex a little. It's just that when I program for my team, most of the time it's control related, or I'm just changing the values of an existing function so I'm not exactly sure how to make this work.

Any Help would be apreciated.

(For reference I have the sensor plugged into Digital 11 and Interupt 1)

MattD 09-05-2006 00:40

Re: Programming ultrasonic sensor in MPlab
 
Quote:

Originally Posted by cromat44
Hi,
I'm trying to program a vex controller with MPlab and I can't seem to figure out how to program the utlrasonic sensor.

I understand the concept that (speed of sound x return time)/2 = distance but how do I implement it.


I know C syntax and have programmed FRC before, and vex a little. It's just that when I program for my team, most of the time it's control related, or I'm just changing the values of an existing function so I'm not exactly sure how to make this work.

Any Help would be apreciated.

(For reference I have the sensor plugged into Digital 11 and Interupt 1)


Team 358 has a Vex Ultrasonic demo code download on their website. This looks like a good place to start.


All times are GMT -5. The time now is 14:12.

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