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 1
/
Copy pathmultiFileProject.ino
58 lines (42 loc) · 1.84 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
55
56
57
58
/****************************************************************************************************************************
multiFileProject.ino
For Teensy41 with QNEthernet
AsyncUDP_Teensy41 is a Async UDP library for the Teensy41 using built-in Ethernet and QNEThernet
Based on and modified from ESPAsyncUDP Library (https://github.com/me-no-dev/ESPAsyncUDP)
Built by Khoi Hoang https://github.com/khoih-prog/AsyncUDP_Teensy41
*****************************************************************************************************************************/
// To demo how to include files in multi-file Projects
#if ( defined(CORE_TEENSY) && defined(__IMXRT1062__) && defined(ARDUINO_TEENSY41) )
// For Teensy 4.1
#define BOARD_TYPE "TEENSY 4.1"
// Use true for NativeEthernet Library, false if using other Ethernet libraries
#define USE_NATIVE_ETHERNET false
#define USE_QN_ETHERNET true
#else
#error Only Teensy 4.1 supported
#endif
#define ASYNC_UDP_TEENSY41_VERSION_MIN_TARGET "AsyncUDP_Teensy41 v1.2.1"
#define ASYNC_UDP_TEENSY41_VERSION_MIN 1002001
#include "multiFileProject.h"
// To be included only in main(), .ino with setup() to avoid `Multiple Definitions` Linker Error
#include <AsyncUDP_Teensy41.h> // https://github.com/khoih-prog/AsyncUDP_Teensy41
void setup()
{
Serial.begin(115200);
while (!Serial);
delay(500);
Serial.println("\nStart multiFileProject");
Serial.println(ASYNC_UDP_TEENSY41_VERSION);
#if defined(ASYNC_UDP_TEENSY41_VERSION_MIN)
if (ASYNC_UDP_TEENSY41_VERSION_INT < ASYNC_UDP_TEENSY41_VERSION_MIN)
{
Serial.print("Warning. Must use this example on Version equal or later than : ");
Serial.println(ASYNC_UDP_TEENSY41_VERSION_MIN_TARGET);
}
#endif
Serial.print("You're OK now");
}
void loop()
{
// put your main code here, to run repeatedly:
}