Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4922

store different values into two variables from rotary encoder

$
0
0
Hi All,
I am trying to store two variables within a while loop after reading a rotary encoder but it stores the same value of w1 when switching over to w2
Code (C):
  1. #include<PinChangeInterrupt.h>
  2. #include<Wire.h>
  3. #include<hd44780.h>
  4. #include<hd44780ioClass/hd44780_I2Cexp.h>
  5. hd44780_I2Cexp lcd;
  6. // Const Variables and pin assinged
  7. constbyte ENC_SW =3; // Encoder Switch
  8. constbyte ENC_PinA =6; // PIN A of Encoder
  9. constbyte ENC_PinB =8; // PIN B of Encoder
  10. constbyte buttonPin =9; // Weld button
  11. //...
store different values into two variables from rotary encoder

Viewing all articles
Browse latest Browse all 4922

Trending Articles