Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Making a counter using a switch

Hello

 

I am programming a robot for school.

My problem that i have run into is that i want to make a counter using a given switch.

Basically the principle is that the switch is attached in such a way that when a gear rotates, the swich is either pushed in or not pushed in.

I would need a piece of program that counts the rising edge of the voltage each time(i think) but have no idea how to do this...

 

anyone out there that can help?

0 Kudos
Message 1 of 2
(3,184 Views)

Hello Tim,

 

Which kind of hardware and software are you currently using?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 2 of 2
(3,166 Views)