so im trying to use millis instead of delay but im not sure how to apply it anyone can help?
#define DATA 8
#define LATCH A3
#define CLOCK 12
#define LATCH_ON PORTC = PORTC | B00001000
#define LATCH_OFF PORTC = PORTC & B11110111
#define CLOCK_ON PORTB = PORTB | B00010000
#define CLOCK_OFF PORTB = PORTB & B11101111
#define DATA_ON PORTB = PORTB | B00000001
#define DATA_OFF PORTB = PORTB & B11111110
void shiftByteMSF(byte leds){
DDRC|=LATCH_OFF;
shiftOut(DATA, CLOCK, LSBFIRST, leds);
shiftOut(DATA, CLOCK, MSBFIRST, leds);
DDRC|=LATCH_ON;
}
void setup(){
DDRC|=LATCH_ON;
DDRB|=DATA_ON;
DDRB|=CLOCK_ON;
}
void loop(){
byte leds = B10000000;
shiftByteMSF(leds);
delay(500);
byte led = B00000000;
shiftByteMSF(led);
delay(500);
}
yes i am aware of the amount of define i have defined but not used they are for another section ![]()