Flash led on first shift register pin alternating to status led
This commit is contained in:
parent
84bc0babdb
commit
bee4bf5c46
1 changed files with 10 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue