Tema: Re: Kam namu temperaturos kontrolerio ant arduino?
Autorius: Tester
Data: 2016-02-07 20:40:37
>Isnaudota 70% arduino atminties.
padeda teksto sukėlimas į program memory. Pvz:
const  char progver[] PROGMEM="Kontroleris 0.1";

void printProgStr (LCD& lcd, const char * str, const byte num_cols, const 
bool clearline)
{
  char c;
  byte printed=0;
  while ((c = pgm_read_byte(str++))){
    lcd.print (c);
    printed++;
  }
  if (clearline==true){
    while (printed<num_cols){
      lcd.print(" ");
      printed++;
    }
  }
} // end of printProgStr

....
printProgStr(lcd,progver,LCD_COLS,true);
.....
Serial.print(F("state: "));