HandheldController/src/main.cpp

29 lines
678 B
C++

#include "Arduino.h"
#include "screen.h"
#include "wifi.h"
#include "controls.h"
#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <string>
using namespace std;
void setup() {
Serial.begin(9600);
displayInit();
controlsInit();
WiFi.softAP(WIFI_SSID, WIFI_PASS);
displayWiFiInformation(WIFI_SSID, WIFI_PASS);
}
float throttle = 0.0f;
uint8_t direction = 0;
bool horn = false;
bool bell = false;
bool lights = false;
void loop() {
getControlsState(throttle, direction, horn, bell, lights);
displayControlStatus(throttle, direction, horn, bell, lights);
//sendControlOutputs(throttle, direction, horn, bell, lights);
delay(1);
}