Go Down

Topic: Rotary enconder, interrupts and LCD Display (Read 863 times) previous topic - next topic


Hi all,

Probably this will be a stupid question, but I'm a real newbie in this "electronic world"...

I have developed a very simple sketch to receive digital input through a rotary encoder (24 steps by turn). This sketch, by the moment, is only able to send the position of the encoder to serial console, but I need to print this position also to a LCD display.

I have a standard LCD display controlled by LiquidCrystal library, that works properly.

The problem is that I have to use digital pin 2 as "interrupt 0", and this pin is used also by library as D7 pin in LCD display...

By the way, I'm using a Duemilanove board, but I have also a Mega 328.

How to solve this? Could I change the way that library uses D7 pin and assign it to another free pin on my arduino board another than digital pin 2? Or on the other hand, could I use an "interrupt" function with a different digital pin apart from digpin 2?

Thanks to all!


Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131