ESP3D
3.0
Firmware for ESP boards connected to 3D Printer
configuration.h
Go to the documentation of this file.
1
/*
2
config.h - ESP3D configuration file
3
4
Copyright (c) 2014 Luc Lebosse. All rights reserved.
5
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2.1 of the License, or (at your option) any later version.
10
11
This library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Lesser General Public License for more details.
15
16
You should have received a copy of the GNU Lesser General Public
17
License along with this library; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
#ifndef _CONFIGURATION_H
21
#define _CONFIGURATION_H
22
//FEATURES - comment to disable //////////////////////////////////////////////////////////
23
24
//SERIAL_COMMAND_FEATURE: allow to send command by serial
25
#define SERIAL_COMMAND_FEATURE
26
27
//AUTHENTICATION_FEATURE: protect pages by login password
28
//#define AUTHENTICATION_FEATURE
29
30
//WIFI_FEATURE : enable WIFI function
31
#define WIFI_FEATURE
32
33
//ETH_FEATURE : enable Ethernet function
34
//#define ETH_FEATURE
35
36
//BLUETOOTH_FEATURE : enable BT Serial function
37
//#define BLUETOOTH_FEATURE
38
39
//HTTP_FEATURE : enable HTTP function
40
#define HTTP_FEATURE
41
42
//TELNET_FEATURE : enable Telnet function
43
#define TELNET_FEATURE
44
45
//WS_DATA_FEATURE: allow to connect serial from Websocket
46
#define WS_DATA_FEATURE
47
48
//DISPLAY_DEVICE: allow screen output
49
//OLED_I2C_SSD1306 1
50
//OLED_I2C_SSDSH1106 2
51
//TFT_SPI_ILI9341_320X240 3
52
//TFT_SPI_ILI9488_480X320 4
53
//#define DISPLAY_DEVICE TFT_SPI_ILI9488_480X320
54
55
//UI_TYPE_BASIC 1
56
//UI_TYPE_ADVANCED 2
57
#define DISPLAY_UI_TYPE UI_TYPE_ADVANCED
58
59
//UI_COLORED 1
60
//UI_MONOCHROME 2
61
#define DISPLAY_UI_COLOR UI_COLORED
62
63
//BUZZER_DEVICE: allow to connect passive buzzer
64
//#define BUZZER_DEVICE
65
66
67
#if defined (DISPLAY_DEVICE)
68
//for ILI9143 edit User_Setup.h of TFT_eSPI library
69
#if (DISPLAY_DEVICE == OLED_I2C_SSD1306) || (DISPLAY_DEVICE == OLED_I2C_SSDSH1106)
70
#define DISPLAY_I2C_PIN_SDA 4
71
#define DISPLAY_I2C_PIN_SCL 15
72
#define DISPLAY_I2C_PIN_RST 16 //comment if not applicable
73
#define DISPLAY_I2C_ADDR 0x3c
74
#endif //(DISPLAY_DEVICE == OLED_I2C_SSD1306) || (DISPLAY_DEVICE == OLED_I2C_SSDSH1106)
75
#define DISPLAY_FLIP_VERTICALY 1 //comment to disable
76
#if (DISPLAY_DEVICE == TFT_SPI_ILI9341_320X240) || (DISPLAY_DEVICE == TFT_SPI_ILI9488_480X320)
77
#define DISPLAY_TOUCH_DRIVER XPT2046_SPI
78
#define DISPLAY_LED_PIN 33 //-1 if none
79
#endif //(DISPLAY_DEVICE == TFT_SPI_ILI9341_320X240) || (DISPLAY_DEVICE == TFT_SPI_ILI9488_480X320)
80
#endif //DISPLAY_DEVICE
81
82
//INPUT_DEVICE: allow input
83
//ROTARY_ENCODER 1
84
//#define INPUT_DEVICE ROTARY_ENCODER
85
86
//DHT_DEVICE: send update of temperature / humidity based on DHT 11/22
87
//#define DHT_DEVICE
88
89
#ifdef BUZZER_DEVICE
90
#define ESP3D_BUZZER_PIN 15
91
#endif //BUZZER_DEVICE
92
93
#ifdef DHT_DEVICE
94
#define ESP3D_DHT_PIN 22
95
//USE_CELSIUS
96
//USE_FAHRENHEIT
97
#define DHT_UNIT USE_CELSIUS
98
#endif //DHT_DEVICE
99
100
//PIN_RESET_FEATURE : allow to reset settings by setting low a pin
101
//#define PIN_RESET_FEATURE
102
#if defined (PIN_RESET_FEATURE)
103
#define ESP3D_RESET_PIN 2
104
#endif //PIN_RESET_FEATURE
105
106
//SD_DEVICE: to access SD Card files directly instead of access by serial using printer Board FW
107
//ESP_SD_NATIVE 1 //esp32 / esp8266
108
//ESP_SDIO 2 //esp32 only
109
//ESP_SDFAT 3 //esp8266 (same as native) / esp32
110
#define SD_DEVICE ESP_SDFAT
111
112
//pin if reader has insert detection feature
113
//let -1 or comment if none
114
#define ESP_SD_DETECT_PIN -1
115
//value expected for ESP_SD_DETECT_PIN
116
#define ESP_SD_DETECT_VALUE 1
117
118
//FILESYSTEM_FEATURE: to host some files on flash
119
//ESP_SPIFFS_FILESYSTEM 0
120
//ESP_FAT_FILESYSTEM 1
121
//ESP_LITTLEFS_FILESYSTEM 2
122
#define FILESYSTEM_FEATURE ESP_SPIFFS_FILESYSTEM
123
124
//Allows to mount /FS and /SD under / for FTP server
125
#define GLOBAL_FILESYSTEM_FEATURE
126
127
//FTP_FEATURE : enable FTP feature
128
//FS_ROOT mount all FS
129
//FS_FLASH mount Flash FS
130
//FS_SD mount SD FS
131
//FS_USBDISK mount USB disk FS
132
#define FTP_FEATURE FS_ROOT
133
134
//DIRECT_PIN_FEATURE: allow to access pin using ESP201 command
135
#define DIRECT_PIN_FEATURE
136
137
//TIMESTAMP_FEATURE: set time system
138
//#define TIMESTAMP_FEATURE
139
140
//FILESYSTEM_TIMESTAMP_FEATURE: display last write time from Flash files
141
//#define FILESYSTEM_TIMESTAMP_FEATURE
142
143
//FILESYSTEM_TIMESTAMP_FEATURE:display last write time from SD files
144
//#define SD_TIMESTAMP_FEATURE
145
146
//MDNS_FEATURE: this feature allow type the name defined
147
//in web browser by default: http:\\esp8266.local and connect
148
//need `bonjour` protocol on windows
149
#define MDNS_FEATURE
150
151
//SSDP_FEATURE: this feature is a discovery protocol, supported on Windows out of the box
152
#define SSDP_FEATURE
153
154
//CAPTIVE_PORTAL_FEATURE: In SoftAP redirect all unknow call to main page
155
#define CAPTIVE_PORTAL_FEATURE
156
157
//OTA_FEATURE: this feature is arduino update over the air
158
//#define OTA_FEATURE
159
160
//WEB_UPDATE_FEATURE: allow to flash fw using web UI
161
#define WEB_UPDATE_FEATURE
162
163
//NOTIFICATION_FEATURE : allow to push notifications
164
#define NOTIFICATION_FEATURE
165
166
//CAMERA_DEVICE: Enable the support of connected camera
167
//CAMERA_MODEL_CUSTOM 0 //Edit the pins in include/pins.h
168
//CAMERA_MODEL_ESP_EYE 1
169
//CAMERA_MODEL_M5STACK_PSRAM 2
170
//CAMERA_MODEL_M5STACK_WIDE 3
171
//CAMERA_MODEL_AI_THINKER 4 e.g. used by ESP32-CAM
172
//CAMERA_MODEL_WROVER_KIT 5
173
//#define CAMERA_DEVICE CAMERA_MODEL_AI_THINKER
174
//#define CAMERA_DEVICE_FLIP_VERTICALY //comment to disable
175
//#define CAMERA_DEVICE_FLIP_HORIZONTALY//comment to disable
176
#define CUSTOM_CAMERA_NAME "ESP32-CAM"
177
178
//Allow remote access by enabling cross origin access
179
//check https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
180
//this should be enabled only in specific cases
181
//like show the camera in web page different than device web server
182
//if you do not know what is that then better left it commented
183
//#define ESP_ACCESS_CONTROL_ALLOW_ORIGIN
184
185
//ESP_GCODE_HOST_FEATURE : allow to send GCODE with ack
186
#define ESP_GCODE_HOST_FEATURE
187
188
//ESP_AUTOSTART_SCRIPT : to do some actions / send GCODE at start, need ESP_GCODE_HOST_FEATURE enabled
189
//can be a line od several GCODES separated by `\n` e.g. "M21\nM117 SD mounted\n"
190
//can be a file name, if exists, commands inside will be processed, e.g "/FS:/autostart.esp"
191
//#define ESP_AUTOSTART_SCRIPT "M117 Mouning SD\nM21\n"
192
193
//ESP_LUA_INTERPRETER_FEATURE : add lua scripting feature
194
//#define ESP_LUA_INTERPRETER_FEATURE
195
196
//Extra features /////////////////////////////////////////////////////////////////////////
197
/************************************
198
*
199
* DEBUG
200
*
201
* **********************************/
202
//Do not do this when connected to printer !!!
203
//be noted all upload may failed if enabled
204
//DEBUG_OUTPUT_SERIAL0 1
205
//DEBUG_OUTPUT_SERIAL1 2
206
//DEBUG_OUTPUT_SERIAL2 3
207
//DEBUG_OUTPUT_TELNET 4
208
//DEBUG_OUTPUT_WEBSOCKET 5
209
//#define ESP_DEBUG_FEATURE DEBUG_OUTPUT_SERIAL0
210
211
#ifdef ESP_DEBUG_FEATURE
212
#define DEBUG_ESP3D_OUTPUT_PORT 8000
213
#endif //ESP_DEBUG_FEATURE
214
215
#if defined (DISPLAY_DEVICE) && (DISPLAY_UI_TYPE == UI_TYPE_ADVANCED)
216
//allows to use [ESP216]SNAP to do screen capture
217
#define DISPLAY_SNAPSHOT_FEATURE
218
#define AUTO_SNAPSHOT_FEATURE
219
#endif //DISPLAY_DEVICE
220
221
/************************************
222
*
223
* Serial Communications
224
*
225
* **********************************/
226
//which serial ESP use to communicate to printer (ESP32 has 3 serials available, ESP8266 only 2)
227
//USE_SERIAL_0 for ESP8266/32
228
//USE_SERIAL_1 for ESP8266/32
229
//USE_SERIAL_2 for ESP32 Only
230
#define ESP_SERIAL_OUTPUT USE_SERIAL_0
231
232
//Serial rx buffer size is 256 but can be extended
233
#define SERIAL_RX_BUFFER_SIZE 512
234
235
/************************************
236
*
237
* Settings
238
*
239
* **********************************/
240
//SETTINGS_IN_EEPROM 0
241
//SETTINGS_IN_PREFERENCES 1
242
#define ESP_SAVE_SETTINGS SETTINGS_IN_EEPROM
243
244
/************************************
245
*
246
* Customize ESP3D
247
*
248
* **********************************/
249
#if defined( ARDUINO_ARCH_ESP8266)
250
#define ESP_MODEL_NAME "ESP8266"
251
#define ESP_MODEL_URL "http://espressif.com/en/products/esp8266/"
252
#endif //ARDUINO_ARCH_ESP8266
253
#if defined( ARDUINO_ARCH_ESP32)
254
#define ESP_MODEL_NAME "ESP32"
255
#define ESP_MODEL_URL "https://www.espressif.com/en/products/hardware/esp-wroom-32/overview"
256
#endif //ARDUINO_ARCH_ESP32
257
#define ESP_MODEL_NUMBER "ESP3D 3.0"
258
#define ESP_MANUFACTURER_NAME "Espressif Systems"
259
#define ESP_MANUFACTURER_URL "http://espressif.com"
260
261
#define NOTIFICATION_ESP_ONLINE "Hi, %ESP_NAME% is now online at %ESP_IP%"
262
#define ESP_NOTIFICATION_TITLE "ESP3D Notification"
263
264
#endif //_CONFIGURATION_H
esp3d
configuration.h
Generated by
1.8.17