This repository was archived by the owner on Feb 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdefines.h
134 lines (104 loc) · 4.05 KB
/
defines.h
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/****************************************************************************************************************************
defines.h for Teensy40_ESP8266Shield.ino
Blynk_Esp8266AT_WM is a library for the Mega, Teensy, SAM DUE and SAMD boards (https://github.com/khoih-prog/Blynk_Esp8266AT_WM)
to enable easy configuration/reconfiguration and autoconnect/autoreconnect of WiFi/Blynk
Based on and Modified from Blynk library v0.6.1 https://github.com/blynkkk/blynk-library/releases
Built by Khoi Hoang https://github.com/khoih-prog/Blynk_Esp8266AT_WM
Licensed under MIT license
*****************************************************************************************************************************/
#ifndef defines_h
#define defines_h
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
// Debug level, 0-3
#define BLYNK_WM_DEBUG 3
#define USE_NEW_WEBSERVER_VERSION true //false
#define _ESP_AT_LOGLEVEL_ 0
#define _ESP_AT_LIB_LOGLEVEL_ 0
/* Comment this out to disable prints and save space */
#define DRD_GENERIC_DEBUG true
/* Comment this out to disable prints and save space */
#define ESP_AT_DEBUG_OUTPUT Serial
//#define ESP_AT_LIB_DEBUG_OUTPUT Serial
#define ESP_AT_DEBUG true
#define ESP_AT_LIB_DEBUG true
// Uncomment to use ESP32-AT commands
//#define USE_ESP32_AT true
// USE_ESP_AT_LIB == true to use new ESP_AT_Lib, instead of ESP8266_Lib
// For ESP32-AT, must use ESP_AT_Lib
#if (defined(USE_ESP32_AT) && USE_ESP32_AT )
#define USE_ESP_AT_LIB true
#else
#define USE_ESP_AT_LIB true
//#define USE_ESP_AT_LIB false
#endif
#if ( defined(CORE_TEENSY) )
#if defined(ESP8266_AT_USE_TEENSY)
#undef ESP8266_AT_USE_TEENSY
#endif
#define ESP8266_AT_USE_TEENSY true
#else
#error This code is intended to run on Teensy platform! Please check your Tools->Board setting.
#endif
#ifdef CORE_TEENSY
// For Teensy 4.1/4.0
//#define EspSerial Serial1 //Serial1, Pin RX1 : 0, TX1 : 1
#define EspSerial Serial2 //Serial2, Pin RX2 : 7, TX2 : 8
//#define EspSerial Serial3 //Serial3, Pin RX3 : 15, TX3 : 14
//#define EspSerial Serial4 //Serial4, Pin RX4 : 16, TX4 : 17
#if defined(__IMXRT1062__)
// For Teensy 4.1/4.0
#define BOARD_TYPE "TEENSY 4.1/4.0"
#elif defined(__MK66FX1M0__)
#define BOARD_TYPE "Teensy 3.6"
#elif defined(__MK64FX512__)
#define BOARD_TYPE "Teensy 3.5"
#elif defined(__MKL26Z64__)
#define BOARD_TYPE "Teensy LC"
#elif defined(__MK20DX256__)
#define BOARD_TYPE "Teensy 3.2" // and Teensy 3.1 (obsolete)
#elif defined(__MK20DX128__)
#define BOARD_TYPE "Teensy 3.0"
#elif defined(__AVR_AT90USB1286__)
#error Teensy 2.0++ not supported yet
#elif defined(__AVR_ATmega32U4__)
#error Teensy 2.0 not supported yet
#else
// For Other Boards
#define BOARD_TYPE "Unknown Teensy Board"
#endif
#endif
#ifndef BOARD_NAME
#define BOARD_NAME BOARD_TYPE
#endif
// Start location in EEPROM to store config data. Default 0
// Config data Size currently is 128 bytes)
#define EEPROM_START 0
#define USE_BLYNK_WM true
//#define USE_BLYNK_WM false
#if USE_BLYNK_WM
#define USE_DYNAMIC_PARAMETERS true
#include <BlynkSimpleShieldEsp8266_Teensy_WM.h>
#else
#include <BlynkSimpleShieldEsp8266_Teensy.h>
#define USE_LOCAL_SERVER true
#if USE_LOCAL_SERVER
char auth[] = "****";
//String BlynkServer = "account.duckdns.org";
String BlynkServer = "192.168.2.112";
#else
char auth[] = "****";
String BlynkServer = "blynk-cloud.com";
#endif
#define BLYNK_SERVER_HARDWARE_PORT 8080
// Your WiFi credentials.
char ssid[] = "****"; // your network SSID (name)
char pass[] = "****"; // your network password
#endif
#define HOST_NAME "STM32_ESP_AT"
// SSID and PW for Config Portal
String portal_ssid = "CfgPrtl-SSID";
String portal_password = "CfgPrtl-PW";
// Your SAMD <-> ESP8266 baud rate:
#define ESP8266_BAUD 115200
#endif //defines_h