#include "Program.h" #include "Arduino.h" #include "DolibarrClient.h" #include "ServoMotorComponent.h" int initialize_wifi(WifiConfig wifi) { WiFiClass::mode(WIFI_STA); //Optional WiFi.setSleep(false); WiFi.begin(wifi.ssid, wifi.password); Serial.print("Connecting "); while(WiFiClass::status() != WL_CONNECTED){ delay(WAITING_WIFI_DELAY); Serial.print("."); } Serial.println("Connected to the WiFi network"); return 0; } Program::Program() { Serial.begin(MONITOR_SPEED); this->servo = new ServoMotorComponent(2, 1, 0.1); //struct WifiConfig wifi_c = {WIFI_SSID, WIFI_PASSWORD}; //struct DolibarrConfig dolibarr = {DOLIBARR_URL, DOLIBARR_API_TOKEN}; //initialize_wifi(wifi_c); //this->client = new DolibarrClient(dolibarr); } void Program::loop() { this->servo->refresh(); this->servo->setDesiredPosition(Position::LEFT); }