From c97743c2229ad57c384ef1621e4dd81f063f4bff Mon Sep 17 00:00:00 2001 From: BryanMartinMirandaLeal Date: Tue, 1 Jul 2025 02:58:46 +0000 Subject: [PATCH] Modified Source Code for Atlas Scientific Pool Kit --- pool_kit_modified.ino | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pool_kit_modified.ino b/pool_kit_modified.ino index 49075fb..a60b71c 100644 --- a/pool_kit_modified.ino +++ b/pool_kit_modified.ino @@ -12,8 +12,8 @@ WiFiClient client; //declare that t //----------------Fill in your Wi-Fi / ThingSpeak Credentials------- const String ssid = "sedeam"; //The name of the Wi-Fi network you are connecting to const String pass = "Sede@m2025"; //Your WiFi network password -const long myChannelNumber = 2399780; //Your Thingspeak channel number -const char * myWriteAPIKey = "4SYBSZ1SZKPDQ8RD"; //Your ThingSpeak Write API Key +const long myChannelNumber = 000000; //Your Thingspeak channel number +const char * myWriteAPIKey = "xxxxxxxxxx"; //Your ThingSpeak Write API Key //------------------------------------------------------------------ int xyz=100; @@ -176,13 +176,13 @@ void step1() { } void step2() { - // Cambios 2000 + //receive_and_print_reading(RTD); //get the reading from the RTD circuit RTD.receive_read_cmd(); print_success_or_error(RTD, String(RTD.get_last_received_reading(), 2).c_str()); - // Fin cambios 2000 + if ((RTD.get_error() == Ezo_board::SUCCESS) && (RTD.get_last_received_reading() > -1000.0)) { //if the temperature reading has been received and it is valid DO.send_cmd_with_num("T,", RTD.get_last_received_reading()); @@ -206,26 +206,26 @@ void step3() { } void step4() { - // Cambios 4001 + //receive_and_print_reading(DO); //get the reading from the DO circuit DO.receive_read_cmd(); print_success_or_error(DO, String(DO.get_last_received_reading(), 2).c_str()); - // Fin cambios 4001 + if (DO.get_error() == Ezo_board::SUCCESS) { //if the PH reading was successful (back in step 1) ThingSpeak.setField(2, String(DO.get_last_received_reading(), 2)); //assign PH readings to the second column of thingspeak channel } Serial.print(","); - // Cambios 4002 + //receive_and_print_reading(ORP); //get the reading from the ORP circuit ORP.receive_read_cmd(); print_success_or_error(ORP, String(ORP.get_last_received_reading(), 2).c_str()); - // Fin cambios 4002 + if (ORP.get_error() == Ezo_board::SUCCESS) { //if the ORP reading was successful (back in step 1) ThingSpeak.setField(3, String(ORP.get_last_received_reading(), 0)); //assign ORP readings to the third column of thingspeak channel @@ -233,13 +233,13 @@ void step4() { Serial.print(","); - // Cambios 4003 + //receive_and_print_reading(EC); EC.receive_read_cmd(); print_success_or_error(EC, String(EC.get_last_received_reading(), 2).c_str()); - // Fin Cambios 4003 + if (EC.get_error() == Ezo_board::SUCCESS){ ThingSpeak.setField(4, String(EC.get_last_received_reading(), 0));