Distancer/Distancer.cpp

30 lines
342 B
C++
Raw Normal View History

2017-02-19 14:04:43 +00:00
#define F_CPU 1000000
2017-02-19 11:56:01 +00:00
#include <avr/io.h>
2017-02-19 14:04:43 +00:00
#include <util/delay.h>
2017-02-19 11:56:01 +00:00
#include "DeviceLib/ShiftRegister.h"
2017-02-19 11:56:01 +00:00
2017-02-19 14:04:43 +00:00
void setupStatusLedPin()
{
DDRB |= (1 << PB0);
}
void flashStatusLed()
{
PORTB |= (1 << PB0);
_delay_ms(100);
PORTB &= ~(1 << PB0);
}
2017-02-19 11:56:01 +00:00
int main()
{
2017-02-19 14:04:43 +00:00
setupStatusLedPin();
2017-02-19 11:56:01 +00:00
while (true)
{
2017-02-19 14:04:43 +00:00
flashStatusLed();
_delay_ms(400);
2017-02-19 11:56:01 +00:00
}
}