forked from AlphaLima/ESP32-Serial-Bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
60 lines (47 loc) · 2.37 KB
/
config.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
// config: ////////////////////////////////////////////////////////////
//
//#define BLUETOOTH
#define OTA_HANDLER
//#define MODE_AP // phone connects directly to ESP
//#define MODE_STA
#define PROTOCOL_TCP
bool debug = true;
#define VERSION "1.10"
// For AP mode:
//const char *ssid = "Spaghet"; // You will connect your phone to this Access Point
//const char *pw = "K3vinB@con"; // and this is the password
//IPAddress ip(192, 168, 4, 1); // From RoboRemo app, connect to this IP
//IPAddress netmask(255, 255, 255, 0);
// Set your Static IP address
//IPAddress local_IP(192, 168, 137, 253);
// Set your Gateway IP address
//IPAddress gateway(192, 168, 137, 57);
//IPAddress subnet(255, 255, 255, 0);
//IPAddress primaryDNS(8, 8, 8, 8); //optional
//IPAddress secondaryDNS(8, 8, 4, 4); //optional
// You must connect the phone to this AP, then:
// menu -> connect -> Internet(TCP) -> 192.168.4.1:8880 for UART0
// -> 192.168.4.1:5760 for UART1
// -> 192.168.4.1:8882 for UART2
#define NUM_COM 3 // total number of COM Ports
#define DEBUG_COM 0 // debug output to COM0
/************************* COM Port 0 *******************************/
#define UART_BAUD0 115200 // Baudrate UART0
#define SERIAL_PARAM0 SERIAL_8N1 // Data/Parity/Stop UART0
#define SERIAL0_RXPIN 21 // receive Pin UART0
#define SERIAL0_TXPIN 1 // transmit Pin UART0
#define SERIAL0_TCP_PORT 8880 // Wifi Port UART0
/************************* COM Port 1 *******************************/
#define UART_BAUD1 115200 // Baudrate UART1
#define SERIAL_PARAM1 SERIAL_8N1 // Data/Parity/Stop UART1
#define SERIAL1_RXPIN 16 // receive Pin UART1
#define SERIAL1_TXPIN 17 // transmit Pin UART1
#define SERIAL1_TCP_PORT 5760 // Wifi Port UART1
/************************* COM Port 2 *******************************/
#define UART_BAUD2 115200 // Baudrate UART2
#define SERIAL_PARAM2 SERIAL_8N1 // Data/Parity/Stop UART2
#define SERIAL2_RXPIN 15 // receive Pin UART2
#define SERIAL2_TXPIN 4 // transmit Pin UART2
#define SERIAL2_TCP_PORT 8882 // Wifi Port UART2
#define bufferSize 1024
//////////////////////////////////////////////////////////////////////////