I want to create a simple 2D Data capture rig. I have the X and Y axes counting using some simple rotary encoders. I have a switch attached to a pole and want to whenever the switch is initially pressed (like a RISING or FALLING Edge trigger) to capture the position data from the X and Y. I want to use an interrupt routine (like below) so it only works the instance the switch is pressing and so the X Y position is still being updated in real time.
One issue i have run into this is the data grab is not working (keeps displaying the same X Y data from the first time the switch is pressed). I want to collect the X and Y position, send the data to a computer program like excel or notepad and then clear the data so the next time the switch is pressed somewhere else it will collect the new data, rinse and repeat.
Is there a better method for doing this?
One issue i have run into this is the data grab is not working (keeps displaying the same X Y data from the first time the switch is pressed). I want to collect the X and Y position, send the data to a computer program like excel or notepad and then clear the data so the next time the switch is pressed somewhere else it will collect the new data, rinse and repeat.
Is there a better method for doing this?
Attachments
-
20.4 KB Views: 3