Cleaned up the interface code a bit

main
Dan 2021-06-25 12:28:24 -06:00
parent 9bd1f2bf21
commit 4830664a42
1 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,6 @@ const char* ssid = "";
const char* password = ""; const char* password = "";
const char* mdns_name = "QMesh-Node0"; const char* mdns_name = "QMesh-Node0";
WiFiServer wifiServer(SERIAL_TCP_PORT); WiFiServer wifiServer(SERIAL_TCP_PORT);
#define RXD2 16 #define RXD2 16
@ -28,6 +27,7 @@ void setup() {
delay(1000); delay(1000);
WiFi.setHostname(mdns_name);
WiFi.begin(ssid, password); WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) { while (WiFi.status() != WL_CONNECTED) {
@ -56,14 +56,14 @@ void loop() {
if (client) { if (client) {
while (client.connected()) { while (client.connected()) {
while (client.available() > 0) { while (client.available() > 0) {
Serial.println("Receiving data"); //Serial.println("Receiving data");
char c = client.read(); char c = client.read();
Serial2.write(c); Serial2.write(c);
} }
delay(10); delay(10);
if (Serial2.available()) { if (Serial2.available()) {
while (Serial2.available()) { while (Serial2.available()) {
Serial.println("Sending data"); //Serial.println("Sending data");
client.write(Serial2.read()); client.write(Serial2.read());
} }
} }