lcd.clear();
lcd.setCursor(0, 0);
lcd.print("WELCOME to F-mod");
Serial.begin(9600);
Max_tim = read2BytesIntFromEePROM(10) ;
Serial.print("Max. Time interval: ") ;
Serial.println(Max_tim) ;
Min_tim = read2BytesIntFromEePROM(8) ;
Serial.print("Min. Time interval: ") ;
Serial.println(Min_tim) ;
Max_humi = read2BytesIntFromEePROM(6) ;
Serial.print("Max-Humidity: ") ;
Serial.println(Max_humi) ;
Min_humi = read2BytesIntFromEePROM(4) ;
Serial.print("Min. Humidity: ") ;
Serial.println(Min_humi);
Max_temp = read2BytesIntFromEePROM(2) ;
Serial.print("Max. Temperature: ") ;
Serial.println(Max_temp) ;
Min_temp = read2BytesIntFromEePROM(0) ; // read Factory parameter: address 0 for 2 byte is minimum temperature
Serial.print("Min. Temperature: ") ;
Serial.println(Min_temp) ;
Here are the outcome````
18:31:55.849 -> Max. Time interval: 1200
18:31:55.849 -> Min. Time interval: 230
18:31:55.894 -> Max-Humidity: 8500
18:31:55.941 -> Min.⸮⸮
Why Serial.print("Max-Humidity: ") ; print 18:31:55.941 -> Min.⸮⸮
and the next code didn't execute anymore.
Most likely something later on in the code is causing the Arduino to lock up. At 9600 baud, what you are seeing in the serial monitor is lagging behind where in the code the Arduino actually is by a considerable amount.
J-M-L
December 26, 2022, 1:52pm
3
Don’t post snippets (Snippets R Us! )
Why string "Max-Humidity:" didn't print correctly and the sketch stop executing the next sketch line.
Welcome to the forum
Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'
Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination
See also FAQ - Arduino Forum for general rules on forum behaviour and etiquette.
Hello,
Welcome to the Arduino Forum.
This guide explains how to get the best out of this forum. Please read and follow the instructions below.
Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is fru…
Please post your full sketch
Help us help you.
Please follow the advice given in this link How to get the best out of this forum when posting code, in particular the section entitled 'Posting code and common code problems'.
Images of code suck.
Use code tags (the </> icon above the compose window) to make it easier to read and copy code for examination
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.
Images of error messages suck.
Code snippets suck.
Include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.
Post a schematic.
Post an image of your project.
Which Micro Controller are you using?
Is this simulator code?
Please describe the problem better then you just did.
.................................................................
Because the value retrieved from the eeprom is poo, is my guess.
Unlikely. The code will be well beyond that point by the time the problem occurs. Putting Serial.flush() after every print will show what was printed last, but the actual problem is somewhere beyond that. Likely exceeding the bounds of an array somewhere, that is a common cause of something like this.
system
Closed
June 24, 2023, 3:12pm
9
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.