Go to Post What's the reason for having a rule if it's not enforced? - jpsaul7usa [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-01-2009, 10:53
EricGoodchild's Avatar
EricGoodchild EricGoodchild is offline
Hello World!
FRC #0399
Team Role: Operator
 
Join Date: Jan 2009
Rookie Year: 2006
Location: CA
Posts: 13
EricGoodchild is an unknown quantity at this point
Digital IO in C++

Hey does anyone know if there is a class for measuring pulse width in the WinLib library?
Reply With Quote
  #2   Spotlight this post!  
Unread 15-01-2009, 15:25
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Digital IO in C++

Quote:
Hey does anyone know if there is a class for measuring pulse width in the WinLib library?
You mean WPILib?
Pulse width of?
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #3   Spotlight this post!  
Unread 15-01-2009, 17:49
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Digital IO in C++

I'm not sure what you're application is, but you can measure pulse widths using the Counter objects in semi-period mode. That is exactly what the ultrasonic sensors do and you can look at the Ultrasonic class source code as an example.

There is one problem though - there is currently a bug in the FPGA that will prevent accurate results, but it will be fixed in the next update.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #4   Spotlight this post!  
Unread 15-01-2009, 23:05
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Digital IO in C++

Our application is to find the angle of a PWM compass that automatically pulses in. What we were wondering is if there was a way to get the interrupt easily to get the pulse width length.
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Digital IO Agggggggggggg! Robostang 548 Programming 3 31-01-2007 22:06
Digital I/O Help RedOctober Technical Discussion 2 27-01-2006 20:19
Digital Caliper as a Digital Readout on Small Mill sanddrag Technical Discussion 9 13-10-2005 22:51
digital i/o connectors Mercutio Electrical 4 19-01-2004 19:20
Digital Cameras Clark Gilbert Chit-Chat 16 07-12-2003 22:59


All times are GMT -5. The time now is 13:17.

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