Help needed pls,How do i scan single input
staffshome
Posts: 28
Hi all,
i need to scan a single input as part of my app ( like debounce for multiple input )been through manual but i cannot seem to find the answer.I think POLLIN is the answer but i· got very confused trying to implement code.
need to scan pin 3 to get 2 solutions.
oop's forgot to say bs2p
Regards Adrian
Post Edited (staffshome) : 9/18/2009 7:37:35 AM GMT
i need to scan a single input as part of my app ( like debounce for multiple input )been through manual but i cannot seem to find the answer.I think POLLIN is the answer but i· got very confused trying to implement code.
need to scan pin 3 to get 2 solutions.
oop's forgot to say bs2p
Regards Adrian
Post Edited (staffshome) : 9/18/2009 7:37:35 AM GMT
Comments
You can also monitor a single pin with INx, a group 4 pins with INA, INB,INC,IND, and a group of 8 pins with INL or INH.
Good explanation of each of these in the Help file in the Stamp programming environment.
Cheers,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't worry. Be happy
thanks for replies,
yes you are correct using INL would work as im usind INB already & can cut out some lines & subroutines but i'm having trouble getting INL to Run ( problem with variables i think ???)
Has anyone got an example of INL to get me Started,i used this to get on right track with INB
·File...... SW21-EX14-Debounce.BS2
'·· Purpose... SCANNING AND DEBOUNCING MULTIPLE INPUTS
'·· Author.... Parallax Stamp Works EXPERIMENT #14
But no info on using INL inputs 0-7, i tried to mod my working INB but not getting anywhere
Regards Adrian