Fix pincommit not working after setup

This commit is contained in:
GHOSCHT 2022-04-10 22:13:39 +02:00
parent 11a511e2ee
commit 71bff35130

View file

@ -11,6 +11,8 @@
const int STEPS = 5; const int STEPS = 5;
const int WIFI_TIMEOUT = 20; const int WIFI_TIMEOUT = 20;
const int bjtCount = 4;
const int bjtPin[bjtCount] = {SIG1A, SIG1B, SIG2A, SIG2B};
BluetoothSerial bt; BluetoothSerial bt;
AsyncWebServer server(80); AsyncWebServer server(80);
@ -21,9 +23,6 @@ Communicator *phone;
Communicator *websocket; Communicator *websocket;
LightController *light; LightController *light;
void TaskBlink(void *pvParameters);
void TaskAnalogRead(void *pvParameters);
void websocketTask(void *parameter) void websocketTask(void *parameter)
{ {
while (true) while (true)
@ -65,12 +64,13 @@ void connectWifi(int timeout)
Serial.println(""); Serial.println("");
Serial.println(WiFi.localIP()); Serial.println(WiFi.localIP());
digitalWrite(LEDB, HIGH);
} }
void setup() void setup()
{ {
const int bjtCount = 4; pinMode(LEDB, OUTPUT);
const int bjtPin[bjtCount] = {SIG1A, SIG1B, SIG2A, SIG2B}; digitalWrite(LEDB, LOW);
computer = new SerialCommunicator(Serial, 9600, 5, 50); computer = new SerialCommunicator(Serial, 9600, 5, 50);
phone = new BluetoothCommunicator(bt, 5, 50); phone = new BluetoothCommunicator(bt, 5, 50);
light = new LightController(bjtPin, bjtCount); light = new LightController(bjtPin, bjtCount);