Adjustments to all fxns

Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
This commit is contained in:
Sara Damiano
2021-05-14 10:40:02 -04:00
parent 6e64e867ec
commit db756813d4

View File

@@ -124,17 +124,6 @@ void setup() {
// !!!!!!!!!!! // !!!!!!!!!!!
// Set your reset, enable, power pins here // Set your reset, enable, power pins here
pinMode(A5, OUTPUT);
DBG("Pin HIGH");
digitalWrite(A5, HIGH);
delay(5000);
DBG("Pin LOW");
digitalWrite(A5, LOW);
delay(1300);
digitalWrite(A5, HIGH);
DBG("Pin HIGH");
// pinMode(20, OUTPUT);
// digitalWrite(20, HIGH);
// !!!!!!!!!!! // !!!!!!!!!!!
DBG("Wait..."); DBG("Wait...");
@@ -248,17 +237,21 @@ void loop() {
}; };
// Read data // Read data
start = millis(); start = millis();
char logo[634]; char logo[640] = {
int read_chars = 0; '\0',
};
int read_chars = 0;
while (client.connected() && millis() - start < 10000L) { while (client.connected() && millis() - start < 10000L) {
while (client.available()) { while (client.available()) {
logo[read_chars] = client.read(); logo[read_chars] = client.read();
logo[read_chars + 1] = '\0';
read_chars++; read_chars++;
start = millis(); start = millis();
} }
} }
SerialMon.println(logo); SerialMon.println(logo);
DBG("##### RECEIVED:", strlen(logo), "CHARACTERS");
client.stop(); client.stop();
} }
#endif #endif
@@ -283,17 +276,21 @@ void loop() {
}; };
// Read data // Read data
startS = millis(); startS = millis();
char logoS[634]; char logoS[640] = {
int read_charsS = 0; '\0',
};
int read_charsS = 0;
while (secureClient.connected() && millis() - startS < 10000L) { while (secureClient.connected() && millis() - startS < 10000L) {
while (secureClient.available()) { while (secureClient.available()) {
logoS[read_charsS] = secureClient.read(); logoS[read_charsS] = secureClient.read();
logoS[read_charsS + 1] = '\0';
read_charsS++; read_charsS++;
startS = millis(); startS = millis();
} }
} }
SerialMon.println(logoS); SerialMon.println(logoS);
DBG("##### RECEIVED:", strlen(logoS), "CHARACTERS");
secureClient.stop(); secureClient.stop();
} }
#endif #endif