Fix pincommit not working after setup

This commit is contained in:
GHOSCHT 2022-04-10 22:13:39 +02:00
parent 3256739198
commit c2bc691f17
No known key found for this signature in database
GPG key ID: A35BD466B8871994

View file

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