Added consolControl & PID

This commit is contained in:
2021-07-26 20:19:33 +02:00
parent 70f6566365
commit 084c046e8c
9 changed files with 202 additions and 153 deletions
+49 -6
View File
@@ -7,14 +7,12 @@
#define M_PWM_1 13
#define M_ENCODE_1A 33
#define M_ENCODE_1B 32
//Right
#define M_DIR_21 23
#define M_DIR_22 14
#define M_PWM_2 22
#define M_ENCODE_2A 26
#define M_ENCODE_2B 25
//GPS
#define GPS_RX 16
#define GPS_TX 17
@@ -47,28 +45,73 @@
#define BUF_SIZE 10
//MoveControl config
#define RUN_MOVE_CONTROL_DELAY 150 // Normal 10 untested
#define RUN_MOVE_CONTROL_DELAY 30 // Normal 10 untested
#define ACCELERATE_STEPS 1
#define PID_LEFT_P 2
#define PID_LEFT_I 5
#define PID_LEFT_D 1
#define PID_RIGHT_P 2
#define PID_RIGHT_I 5
#define PID_RIGHT_D 1
#define PID_OUT_MIN -100
#define PID_OUT_MAX 100
#define PID_SAMPLETIME 30
//ManualControl config
#define RUN_MANUALCONTROL_DELAY 10
#define RUN_MANUALCONTROL_DELAY 10 // normaly 10
#define MANUALCONTROL_MAX_SPEED 1.0
#define MANUALCONTROL_MAX_ROTATION 1.0
// PS3 Controller
// ESP32 MAC BL 24:62:AB:F2:4B:3A
//Network config
#define VOERDE
//Network config DORTMUND
#ifdef DORTMUND
#define WLAN_SSID "Kleiax2"
#define WLAN_PASSWORD "Punica-699"
#define WLAN_IP 0x0101a8c0 //192.168.1.1
#define WLAN_SUBNETMASK 0x0000FFFF //255.255.0.0
#define WLAN_GATEWAY 0x0100a8c0 //192.168.0.1
// #define MQTT_SERVER 0x1300a8c0 //192.168.0.19
#define MQTT_SERVER 0x0201a8c0 //192.168.1.2
#define MQTT_PORT 1883
#define MQTT_BUFFER_SITE 128
#define NTP_SERVER 0x0201a8c0 //192.168.1.2
#endif //DORTMUND
//Network config FRENZY
#ifdef FRENZY
#define WLAN_SSID "GNX7EDD84-2"
#define WLAN_PASSWORD "2W2ZLPJ9NVQ3"
#define WLAN_IP 0x0F01a8c0 //192.168.1.15
#define WLAN_SUBNETMASK 0x00FFFFFF //255.255.255.0
#define WLAN_GATEWAY 0xfe01a8c0 //192.168.1.254
#define MQTT_SERVER 0x0201a8c0 //192.168.1.2
#define MQTT_PORT 1883
#define MQTT_BUFFER_SITE 128
#define NTP_SERVER 0x0201a8c0 //192.168.1.2
#endif //FRENZY
//Network config VOERDE
#ifdef VOERDE
// #define KELLER
#ifndef KELLER
#define WLAN_SSID "Der Neue"
#define WLAN_PASSWORD "Punica-699"
#endif // KELLLER
#ifdef KELLER
#define WLAN_SSID "Keller-Wlan"
#define WLAN_PASSWORD "Punica-699"
#endif // KELLER
#define WLAN_IP 0x4db2a8c0 //192.168.178.77
#define WLAN_SUBNETMASK 0x00FFFFFF //255.255.255.0
#define WLAN_GATEWAY 0x01b2a8c0 //192.168.178.1
#define MQTT_SERVER 0x4eb2a8c0 //192.168.178.78
#define MQTT_PORT 1883
#define MQTT_BUFFER_SITE 128
#define NTP_SERVER 0x01b2a8c0 //192.168.178.1
#endif // VOERDE
// GPS config
#define GPS_BAUD 9600