Flash led on first shift register pin alternating to status led

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

View file

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