2:31 am
January 30, 2020
Hello:
Attached is a VI, with comments, that I tried to put together to read changing status on Digital Input Pin 7. A change in status should cause the counter to increase via interrupt call. However, when reading the accumulated counts I still get 0 while I rotate Encoder to cause Pin 7 to go Hi then Lo several times, by sending 5V to pin 7 for High, and 0 Volts for low. The -ve Digital Input channel is connected to ground terminal on Arduino board.
Am I doing something wrong to monitor the interrupt events on Pin 7? Can someone please take a look?
Thanks for any help that can be provided.
Anthony
5:47 am
March 12, 2015
You need to read the help context of the Attach Interrupt VI or open the front panel. There are only 2 digital interrupts on the Uno on pins 2 and 3. You cannot use pin 7. You would also use the corresponding interrupt number (0 or 1), not the pin number. Take a look at the Interrupt - On Digital Input Edge.vi example. You could use that example as is to test you are receiving interrupts from your encoder. Just wire it to the pin 2 where the switch is shown.
30
1 Guest(s)