1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <avr/io.h> #include <util/delay.h> #include <Arduino.h> void display(int bits) { PORTB = bits; _delay_ms(500); } int main () { DDRB = 0xff; display(0b00111111); while(1) { display(0b00000001;); _delay_ms(600000); } }