Max LCD size

#define lcd_size 8 //this will define number of LCD on the phone app

Every time lcd[7] causes a connection with ip address in the app on my tablet !

Do we have more informaton / examples / explanation how this works ?
code :
// Sensor 2
lcd[4] = "Temp and Humidity DHT22 pin 8 ";// DHT22 pin 8
lcd[5] = temperature2 ;
lcd[6] = humidity2 ;
// lcd[7] = " Temperatuur Analoog 1 " ;

// lcd[7] = "Temperatuur Analoog 1 ";

/*

How i the lcd array declared ?
What type of lcd screen do you have ?

Why did you not post your complete program ?

UKHeliBob:
How i the lcd array declared ?
What type of lcd screen do you have ?

Why did you not post your complete program ?

the lcd screen is i the app on my samsung tablet.

Sorry , i thought the complete program. Below it follows.
I did a lot of tests and letft out the String contacenation.
Further i experiented with the refresh time and delays.

Everytime , when i put writing of the lcd[7] in it , the program runs, also in the monitor, but i get the message on my tablet from the app, "could not connect to ip *** " .

maybe i ave to contact tatco !

Code :
/*
************* Test Adjust to Uno *********
*** A1 temperatuur toegevoegd.
*** DHT 22 TAB toevoegen
Added 2 x DHT22
Added LCD 6
Delay 1500 to 1500
Refresh 15 to 20
Done By TATCO Inc.

Contact:
info@tatco.cc

Release Notes:

  • Created 10 Oct 2015
  • V2 Updated 04 Nov 2016
  • V3 Updated 05 Oct 2017

Note:
1- This sketch compatable with Eathernet shield and Wiznet W5100
3- Uno & Leo pins# 10, 11, 12, 13 used for ethernet shield
4- Mega Pins# 10, 50, 51, 52, 53 used for ethernet shield
5- EthernetBonjour not completely tested, stability issues have to be considered.

*/

#include <SPI.h>
#include <Ethernet.h>
#include <Servo.h>
#include <SimpleDHT.h>

// VCC: 5V or 3V
// GND: GND
// SENSOR 1 is in Digital Data pin: 7
// SENSOR 1 is in Digital Data pin: 8

int dataPinSensor1 = 7;
int dataPinSensor2 = 8;
SimpleDHT22 dht22;

#define lcd_size 8 //this will define number of LCD on the phone app
int refresh_time = 20; //the data will be updated on the app every 5 seconds.

byte mac = { 0x00, 0xAA, 0xBB, 0xCC, 0xDA, 0x02 };
IPAddress ip(192, 168, 178, 249); //Uncomment for fixed IP or leave for DHCP
EthernetServer httpServer(80);
EthernetClient client;

char mode_action[54];
int mode_val[54];
Servo myServo[53];

String mode_feedback;
String lcd[lcd_size];
String api, channel, notification, user_id;

String httpOk = “HTTP/1.1 200 OK\r\n Content-Type: text/plain \r\n\r\n”;

void setup(void)
{
while (!Serial) {
;// wait for serial port to connect. Needed for Leonardo only
}
Serial.begin(9600);
Serial.println(F("Please wait for IP… "));
//Ethernet.begin(mac, ip);// Uncomment for fixed IP
Ethernet.begin(mac); // Comment for fixed IP
httpServer.begin();
// EthernetBonjour.begin(“ethernet”);//Insted of IP you can use hostname http://ethernet.local to connect in the app.–>> for iOS only
// EthernetBonjour.addServiceRecord(“ethernet”, 80, MDNSServiceTCP);
Serial.println(Ethernet.localIP());
boardInit();
}

void loop(void){
// Reading data from sensor 1…
Serial.println(“Getting data from sensor 1…”);

// read without samples.
byte temperature = 0;
byte humidity = 0;
int err = SimpleDHTErrSuccess;
if ((err = dht22.read(dataPinSensor1, &temperature, &humidity, NULL)) != SimpleDHTErrSuccess) {
Serial.print(“Communication error with Sensor 1, err=”); Serial.println(err);delay(500);
return;
}
// converting Celsius to Fahrenheit

byte f = temperature * 1.8 + 32;

Serial.print(“Sample OK: “);
Serial.print((int)temperature); Serial.print(” *C, “);
Serial.print((int)humidity); Serial.println(” H humidity”);

lcd[0] = " 10_IP_Address 178-249 ";// you can send any data to your mobile phone.
lcd[1] = "Temp and Hum DHT22 pin 7 ";
lcd[2] = temperature;
lcd[3] = humidity;

// Reading data from sensor 2…
// ============================

Serial.println(“Getting data from sensor 2…”);
byte temperature2 = 0;
byte humidity2 = 0;
if ((err = dht22.read(dataPinSensor2, &temperature2, &humidity2, NULL)) != SimpleDHTErrSuccess) {
Serial.print(“Communication error with Sensor 2, err=”); Serial.println(err);delay(500);
return;
}

// converting Celsius to Fahrenheit
byte fb = temperature2 * 1.8 + 32;

Serial.print(“Sample OK: “);
Serial.print((int)temperature2); Serial.print(” *C, “);
Serial.print((int)humidity2); Serial.println(” H humidity”);

// DHT11 sampling rate is 1HZ.
delay(1000);

// Sensor 2
lcd[4] = "Temp and Humidity DHT22 pin 8 ";// DHT22 pin 8
lcd[5] = temperature2 ;
lcd[6] = humidity2 ;
// lcd[7] = " Temperatuur Analoog 1 " ;

// lcd[7] = "Temperatuur Analoog 1 ";

/*
float sensorVal = analogRead(1);
float voltage = (sensorVal/1024.0)* 5.0 ;
temperature = (voltage - .5) * 100 ;
lcd[8] = temperature ;
*/

// EthernetBonjour.run();

EthernetClient client = httpServer.available();
if (client) {
while (client.connected()) {
if (client.available()) {
process(client);
delay(100);
client.flush();
client.stop();
}
}
}
update_input();
}

void process(EthernetClient client) {
String getString = client.readStringUntil(’/’);
String arduinoString = client.readStringUntil(’/’);
String command = client.readStringUntil(’/’);

if (command == “terminal”) {
terminalCommand(client);
}

if (command == “digital”) {
digitalCommand(client);
}

if (command == “analog”) {
analogCommand(client);
}

if (command == “servo”) {
servo(client);
}

if (command == “mode”) {
modeCommand(client);
}

if (command == “allonoff”) {
allonoff(client);
}

if (command == “refresh”) {
refresh(client);
}

if (command == “allstatus”) {
allstatus(client);
}

}

void terminalCommand(EthernetClient client) {//Here you recieve data form app terminal
String data = client.readStringUntil(’/’);
Serial.println(data);
client.print(httpOk);
}

void refresh(EthernetClient client) {
int value;
value = client.parseInt();
refresh_time = value;
client.print(httpOk);
}

void digitalCommand(EthernetClient client) {
int pin, value;
pin = client.parseInt();
if (client.read() == ‘/’) {
value = client.parseInt();
digitalWrite(pin, value);
mode_val[pin] = value;
client.print(httpOk);
}
}

void analogCommand(EthernetClient client) {
int pin, value;
pin = client.parseInt();
if (client.read() == ‘/’) {
value = client.parseInt();
analogWrite(pin, value);
mode_val[pin] = value;
client.print(httpOk);
}
}

void servo(EthernetClient client) {
int pin, value;
pin = client.parseInt();
if (client.read() == ‘/’) {
value = client.parseInt();
myServo[pin].write(value);
mode_val[pin] = value;
client.print(httpOk);
HAVE TO CUT OF HERE because program exceeds the limit