Flash led on first shift register pin alternating to status led

This commit is contained in:
mandlm 2017-02-19 15:14:05 +01:00
parent 84bc0babdb
commit bee4bf5c46

View File

@ -3,9 +3,9 @@
#include <avr/io.h> #include <avr/io.h>
#include <util/delay.h> #include <util/delay.h>
#include "DeviceLib/ShiftRegister.h" #include "LcdShiftReg.h"
void setupStatusLedPin() void setupStatusLed()
{ {
DDRB |= (1 << PB0); DDRB |= (1 << PB0);
} }
@ -19,11 +19,18 @@ void flashStatusLed()
int main() int main()
{ {
setupStatusLedPin(); setupStatusLed();
LcdShiftReg lcdShiftReg;
while (true) while (true)
{ {
flashStatusLed(); flashStatusLed();
_delay_ms(400); _delay_ms(400);
lcdShiftReg.set(1);
_delay_ms(100);
lcdShiftReg.set(0);
_delay_ms(400);
} }
} }