-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.cpp
executable file
·84 lines (72 loc) · 1.59 KB
/
template.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
**********************************************************
* CATEGORY HARDWARE
* GROUP MICROCONTROLLER
* AUTHOR LANCE HAYNIE <[email protected]>
* DATE YYYY-MM-DD
* PURPOSE
* FILE
**********************************************************
* MODIFICATIONS
* YYYY-MM-DD - LHAYNIE - INITIAL VERSION
**********************************************************
ATMEGA Non I/O pin definitions
ATM01 = reset
ATM07 = VCC
ATM08 = GND
ATM09 = crystal
ATM10 = crystal
ATM20 = VCC
ATM21 = analog reference
ATM22 = GND
//Digital pins
ATM02 = 0 //RX
ATM03 = 1 //TX
ATM04 = 2
ATM05 = 3
ATM06 = 4
ATM11 = 5 //PWM
ATM12 = 6 //PWM
ATM13 = 7
ATM14 = 8
ATM15 = 9 //PWM
ATM16 = 10 //PWM
ATM17 = 11 //PWM
ATM18 = 12
ATM19 = 13
//Analog pins
ATM23 = A0
ATM24 = A1
ATM25 = A2
ATM26 = A3
ATM27 = A4
ATM28 = A5
*/
//**********************************************************
// GLOBAL VARIABLES/INCLUDES/MISC
//**********************************************************
#include "config.h"
#include "functions.h"
//**********************************************************
// MAIN PROGRAM
//**********************************************************
//program setup
void setup() {
//let the system boot real quick
delay(500);
//initialize serial
initSerial();
//initialize pin 19 (Arduino 13) as output
pinMode(ATM19, OUTPUT);
}
//program loop
void loop() {
//turn an LED on
digitalWrite(ATM19, HIGH);
Serial.print("On\n");
delay(1000);
//then turn it back off
digitalWrite(ATM19, LOW);
Serial.print("Off\n");
delay(1000);
}