This repository has been archived by the owner on Jan 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmultiFileProject.ino
54 lines (43 loc) · 2.09 KB
/
multiFileProject.ino
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
/****************************************************************************************************************************
multiFileProject.ino
For AVR-based boards (UNO, Nano, Mega, 32U4, 16U4, etc. )
Written by Khoi Hoang
Built by Khoi Hoang https://github.com/khoih-prog/AVR_Slow_PWM
Licensed under MIT license
*****************************************************************************************************************************/
// To demo how to include files in multi-file Projects
#if ( defined(__AVR_ATmega644__) || defined(__AVR_ATmega644A__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || \
defined(ARDUINO_AVR_UNO) || defined(ARDUINO_AVR_NANO) || defined(ARDUINO_AVR_MINI) || defined(ARDUINO_AVR_ETHERNET) || \
defined(ARDUINO_AVR_FIO) || defined(ARDUINO_AVR_BT) || defined(ARDUINO_AVR_LILYPAD) || defined(ARDUINO_AVR_PRO) || \
defined(ARDUINO_AVR_NG) || defined(ARDUINO_AVR_UNO_WIFI_DEV_ED) || defined(ARDUINO_AVR_DUEMILANOVE) || defined(ARDUINO_AVR_FEATHER328P) || \
defined(ARDUINO_AVR_METRO) || defined(ARDUINO_AVR_PROTRINKET5) || defined(ARDUINO_AVR_PROTRINKET3) || defined(ARDUINO_AVR_PROTRINKET5FTDI) || \
defined(ARDUINO_AVR_PROTRINKET3FTDI) )
#define USE_TIMER_1 true
#warning Using Timer1
#else
#define USE_TIMER_3 true
#warning Using Timer3
#endif
#define AVR_SLOW_PWM_VERSION_MIN_TARGET F("AVR_Slow_PWM v1.2.0")
#define AVR_SLOW_PWM_VERSION_MIN 1002000
#include "multiFileProject.h"
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
#include "AVR_Slow_PWM.h"
void setup()
{
Serial.begin(115200);
while (!Serial);
Serial.println("\nStart multiFileProject");
Serial.println(AVR_SLOW_PWM_VERSION);
#if defined(AVR_SLOW_PWM_VERSION_MIN)
if (AVR_SLOW_PWM_VERSION_INT < AVR_SLOW_PWM_VERSION_MIN)
{
Serial.print("Warning. Must use this example on Version equal or later than : ");
Serial.println(AVR_SLOW_PWM_VERSION_MIN_TARGET);
}
#endif
}
void loop()
{
// put your main code here, to run repeatedly:
}