Show Posts
Pages: [1]
1  Using Arduino / Sensors / Rotary enconder, interrupts and LCD Display on: June 07, 2011, 05:19:45 pm
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!
Pages: [1]