#include <SevenSegment.h>
#define CLOCK 44 // Arduino digital 44 -> AY0438 clock
#define DATA 46 // Ardino digital 46 -> AY0438 data
#define LOAD 45 // Ardino digital 45 -> AY0438 load
SevenSegment screen(CLOCK, DATA, LOAD);
uint16_t counter = 0;
void setup(){
if i use arduino nano instead arduino mega, which pin for data, clock and load ?
i think to use clock = A4
but i don't know the other
can someone suggest me?
thanks
roberto
I think that you can use any pins. Just make sure that the pins chosen are the ones inserted into the pin defines.
#define CLOCK 44 // Arduino digital 44 -> AY0438 clock
#define DATA 46 // Ardino digital 46 -> AY0438 data
#define LOAD 45 // Ardino digital 45 -> AY0438 load
Replace 44, 45, 46 with the pin numbers that you choose.
And, yes, it is perfectly fine to use the analog inputs (A0 - A5) as digital pins.
Note that A6 and A7 may NOT be used as digital pins.