all home built solar system


Author Message
nickskethisniks
Guru

Joined: 17/10/2017
Location: Belgium
Posts: 469
Posted: 08:05pm 31 May 2021      

Yeah, sorry we are messing with your threads .

Peter is it problem I poll the nano2 like 1 time/sec, or will it mess with the reliabililty . I want to poll for data to use on a webpage/ safe in a database.
I know you did it a bit differently in the mppt code to make sure the code was not running slow.

Something like this:

 switch (c)
   {
   case '^':         // this probably used by myself only, to allow remote control of nanverter via the raspberry pi & USB serial
     spstr.setCharAt(0,' ');                           // remove ^, so as to allow conversion to int
     i = spstr.toInt();                                // send ^nn<newline>
     if (i == 42)        Serial.println("the answer to life, the universe and everything");
     if (i == 10)        oen = 0;                      //
     if (i == 11)        oen = 1;                      // eg 13<newline> to obtain DC volts
     if (i == 12)       { Serial.print(acv);                      
                           Serial.print(",");
                           Serial.print(dcv);
                           Serial.print(",");
                           Serial.print(aci);
                           Serial.print(",");
                           Serial.print(dci);
                           Serial.print(",");
                           Serial.print(hs_temp);
                           Serial.print(",");
                           Serial.print(tor_temp);
                           Serial.println("*");
Edited 2021-06-01 06:08 by nickskethisniks