Go to Post It doesn't matter if students get inspiration from planning to creating to manufacturing to purchasing to watching to engineers creating the parts etc etc etc. As long as students are getting Inspired, FIRST is doing it's mission. - David Kelly [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-02-2008, 14:31
de_ de_ is offline
Registered User
AKA: Dave Edwards
FRC #1310 (Runnymede Robotics)
Team Role: Mentor
 
Join Date: Apr 2005
Rookie Year: 2005
Location: Toronto, Ontario
Posts: 256
de_ is a jewel in the roughde_ is a jewel in the roughde_ is a jewel in the roughde_ is a jewel in the rough
IR Sensor: Does Slow Loop Polling Work.

The IR specs say the IR sensor outputs 100MS pulses. The RC slow loop is ~26ms (unless your code takes longer than 26ms!) which means you should easily be able to catch IR sensor outputs without interrupts. Our quick test a few weeks ago did not catch IR outputs though maybe we did something wrong.

Anyone successfully using standard slow loop polling (ie NOT non-interrupt driven, NOT high speed CPU timer based polling) successfully with the IR Sensor ?

If doesn't work, do we know why not ? Has anyone actually measured the pulse width ?
  #2   Spotlight this post!  
Unread 07-02-2008, 14:50
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: IR Sensor: Does Slow Loop Polling Work.

I've done it without problems. You get 3 to 4 hits.
I've got some FRC example code here that does everything in Default_Routine().
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 07-02-2008, 23:49
JonathanLKS JonathanLKS is offline
Code::Blocks
FRC #0610 (The Coyotes)
Team Role: Leadership
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Toronto
Posts: 36
JonathanLKS will become famous soon enough
Send a message via MSN to JonathanLKS
Re: IR Sensor: Does Slow Loop Polling Work.

I've also gotten the IR sensor to work fine in the slow loop. All I did was just a simple if statement like this
Code:
if(rc_dig_in01 == 1)
{
button_pressed = 1;
}
__________________

Team 610 [ Co-Leader | Head Programmer | Webmaster ]
We're attending: Greater Toronto Regional, San Diego Regional, Championship
Closed Thread


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
How does it work? Ryan O Control System 5 12-03-2006 19:15
Does easy c work in nt? Bob22341 Programming 2 12-01-2006 22:11
How slow is too slow? Joe Ross Rules/Strategy 23 12-10-2004 20:23
How do light sensor(Banner) work? roberthan Programming 9 25-02-2004 14:05
sensor doesn't work PBoss Programming 7 29-01-2003 18:39


All times are GMT -5. The time now is 23:46.

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