View Single Post
  #5   Spotlight this post!  
Unread 01-04-2007, 18:45
SgtMillhouse648's Avatar
SgtMillhouse648 SgtMillhouse648 is offline
Registered User
AKA: Malhon Godwin
FRC #0648 (QC Elite)
Team Role: Engineer
 
Join Date: Apr 2006
Rookie Year: 2005
Location: Davenport, IA
Posts: 153
SgtMillhouse648 has a spectacular aura aboutSgtMillhouse648 has a spectacular aura about
Send a message via MSN to SgtMillhouse648
Re: pulsing digital out pins, not as fast as pwms

i dont know if you could do it on a loop count basis, have it increment a counter each time through the loop, and then once it is within a certain range set a digout equal to one? something like

if(counter < 5)
{
counter = counter + 1;
rcdigout01 = 0;
}
elseif(5 <= counter <= 7)
{
counter = counter + 1;
rcdigout01 = 1;
}
else
{
counter = 0
rcdigout01 = 0
}


will this work? I know we did a thing like this when we were working on a delay in our camera search routine to make it pause in between movements

Malhon
__________________
2007-
Midwest Regional-
Regional Finalists with 1000 and 447
Rockwell Automation Inspiration in Control Award
Regional Woodie Flowers - Ed Wegscheid