-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.ino
More file actions
87 lines (47 loc) · 1.35 KB
/
Copy pathmain.ino
File metadata and controls
87 lines (47 loc) · 1.35 KB
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
85
86
87
// base layer
#include "encoder.h"
#include "buttons.h"
#include "infrared.h"
#include "fm_radio.h"
#include "ultrasound.h"
#include "clock.h"
#include "environment.h"
// intermediate layer
#include "page_manager.h"
#include "structure.h"
// output layer
#include "lcd_I2C.h"
#define LcdDsiplay Lcd_I2C // i call it LcdDisplay so when i import the Lcd without _I2C i dont have
// to go through the whole code just to change one var name to another
void setup() {
// etner point on startup only
Serial.begin(9600);
// base layer
Buttons::init();
Infrared::init();
Clock::init();
Ultrasound::init();
Encoder::init();
Environment::init();
FM_Radio::init();
// intermediate layer
PageManager::init();
// output layer
LcdDsiplay::init(); // at home am using the LCD_I2C because thats what i got
// in lab we have the lcd withuot the I2C bus module
}
void loop() {
// main loop enter point
// base layer
Encoder::loop();
Buttons::loop();
Infrared::loop();
Clock::loop();
Ultrasound::loop();
Environment::loop();
FM_Radio::loop(); // this does nothing right now but later it might do something
// intermediate layer
PageManager::loop();
// ouput layer
LcdDsiplay::loop();
}