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 9
/
multiFileProject.ino
52 lines (39 loc) · 1.62 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
/****************************************************************************************************************************
multiFileProject.ino
For ESP32, ESP32_S2, ESP32_S3, ESP32_C3 boards with ESP32 core v2.0.0+
Written by Khoi Hoang
Built by Khoi Hoang https://github.com/khoih-prog/ESP32_PWM
Licensed under MIT license
*****************************************************************************************************************************/
// To demo how to include files in multi-file Projects
#if !defined( ESP32 )
#error This code is designed to run on ESP32 platform, not Arduino nor ESP8266! Please check your Tools->Board setting.
#endif
#define ESP32_PWM_VERSION_MIN_TARGET "ESP32_PWM v1.3.1"
#define ESP32_PWM_VERSION_MIN 1003001
// These define's must be placed at the beginning before #include "ESP32_PWM.h"
// _PWM_LOGLEVEL_ from 0 to 4
// Don't define _PWM_LOGLEVEL_ > 0. Only for special ISR debugging only. Can hang the system.
#define _PWM_LOGLEVEL_ 3
#include "multiFileProject.h"
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
#include "ESP32_PWM.h"
void setup()
{
Serial.begin(115200);
while (!Serial);
delay(300);
Serial.println("\nStart multiFileProject");
Serial.println(ESP32_PWM_VERSION);
#if defined(ESP32_PWM_VERSION_MIN)
if (ESP32_PWM_VERSION_INT < ESP32_PWM_VERSION_MIN)
{
Serial.print("Warning. Must use this example on Version equal or later than : ");
Serial.println(ESP32_PWM_VERSION_MIN_TARGET);
}
#endif
}
void loop()
{
// put your main code here, to run repeatedly:
}