forked from hollingerc/going-beyond-arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblink.c
33 lines (29 loc) · 746 Bytes
/
blink.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* project: Blink
* file: blink.c
*
* Created: 2016-08-05
* Author : Craig Hollinger
*
* Source code for blinking the LED connected to Pin 13 (PORTB5) found on most
* Arduino boards.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of either the GNU General Public License version 3
* or the GNU Lesser General Public License version 3, both as
* published by the Free Software Foundation.
*/
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRB = 0b00100000;
/* Replace with your application code */
while (1)
{
PORTB = 0b00100000;
_delay_ms(250);
PORTB = 0b00000000;
_delay_ms(250);
}
}