//------- - 15.04.2021 // BASIC PROGRAM - NUMBERS //------- #include //--------------- VARIABLES USED IN MODULES - MUST BE char pit = ""; int spd = 8; //--------------- int count = 0; void setup() { //----------- START I2C COMMUNICATION - MUST BE Wire.setClock(100000); Wire.begin(); // join i2c bus //----------- begin_def(); // start screen } void loop() { ispis(String(count)+";2;1;3"); count += 1; delay(1000); ispis("CLS"); } //------------------------------------------------------------ SETTINGS void begin_def() // all settings you need in program { ispis("RST"); delay(200); ispis("CLS"); delay(500); } //------------------------------------------------------------ MAIN MODULE void ispis(String poruka) { Serial.println(poruka); poruka = poruka + ";"; int duz = poruka.length(); if (duz > 30) { String por1 = poruka.substring(0,30)+"+"; char dio1[31]; por1.toCharArray(dio1,duz); Wire.beginTransmission(0x11); Wire.write(dio1); Wire.endTransmission(); String por2 = poruka.substring(30); duz = por2.length(); char dio2[duz]; por2.toCharArray(dio2,duz); Wire.beginTransmission(0x11); Wire.write(dio2); Wire.endTransmission(); delay(duz*spd); } else { char copy[duz]; poruka.toCharArray(copy,duz); Wire.beginTransmission(0x11); Wire.write(copy); Wire.endTransmission(); delay(duz*spd); } }