Chat freely about anything...

User avatar
By McChubby007
#75271 I know you are a novice so I will go easy on you, and just point out a couple of things which look obviously wrong and/or unnecessary:
1. There is a SPIFFS.begin in setup and there is also one somewhere else.
2. Listen() is called both inside an if as well as outside it::
// Disable listen function prior to writing data to log file
if (!((((MINUTE) == 14)||
((MINUTE) == 29)||
((MINUTE) == 44)||
((MINUTE) == 59))
&& ((MINUTE) > 50)))
{
listen();
}
listen();

More generally, now that it works, I would strongly suggest that you 'tidy' it - by tidy I don't mean cosmetic, I mean try to modularise the functionality and get rid of some of those globals, and various state flags here and there.
You might be worth looking at your choice of opening spiffs files here and there, and instead open the regular log file at startup. Consider file i/o (and serial i/o prints for that matter) to be very costly in terms of real-time performance and how that might affectect current or future functioning of your software.
There are a number of functions in the webserver library which provide common http formatting responses etc, you may find some of your code can be replaced by it.
User avatar
By Sirquil
#75289 @ McChubby007

You make some valid statements on "tidying" up the code. December of 2012 a friend gave me an Arduino Uno and I picked up a book, "Beginning C for Arduino" by Ph. D. Jack Purdum. I learn mostly by doing; however, I have turned to the book, videoes, Forums and Google for my "learning" experiences. I am mostly task oriented at 69 years of age, I do not see ever reaching professional programing excellency I was once told my project had many "moving parts," it does; I set out just to be able to retrieve files from "Adafruit CC3000 Shield" SD card for myself remotely, project has grown to it's present form with web interface running on a less than $5.00, RobotDyn WiFi D1 board. I am proud of my accomplishments and of those to come. Hardly a novice.

Have you visited the website? Project website: http://weather-1.ddns.net/Weather
Last edited by Sirquil on Mon Jan 24, 2022 4:29 pm, edited 1 time in total.
User avatar
By McChubby007
#75292
Sirquil wrote:@ McChubby007

You make some valid statements on "tidying" up the code. December of 2012 a friend gave me an Arduino Uno and I picked up a book, "Beginning C for Arduino" by Ph. D. Jack Purdum. I learn mostly by doing; however, I have turned to the book, videoes, Forums and Google for my "learning" experiences. I am mostly task oriented at 69 years of age, I do not see ever reaching professional programing excellency I was once told my project had many "moving parts," it does; I set out just to be able to retrieve files from "Adafruit CC3000 Shield" SD card for myself remotely, project has grown to it's present form with web interface running on a less than $5.00, RobotDyn WiFi D1 board. I am proud of my accomplishments and of those to come. Hardly a novice.

Have you visited the website? Project website: http://tinyurl.com/Observations-weather

With all due respect your code demonstrates to me that you are a novice when writing software and being able to construct something into a cohesive design is something you have yet to accomplish. I am able to make that statement because I have 30+ years experience as a software engineer and headed the Uk's air traffic operations support centre, where I trained novice programmers. I was trying to be positive, but in all honesty anyone presenting me that code even as a first draft would be up for a disciplinary hearing. Please don't try to baffle with me with BS, I can smell it a mile away. You are a novice, there's nothing wrong with that but don't go saying you are knowledgeable 'about Arduino' etc etc, you have not yet grasped the 1980s paradigm of 'top-down' programming let alone OOD/OOP. You're got me all annoyed now... I'm not going to say any more on the subject, get some humility.
User avatar
By Sirquil
#75294 I am an amateur, hobbyist; not a paid professional programmer. May not be the the most perfect code; it accomplishes all it sets out to do. I am happy with the code. Thank you for sharing your opinion.

ESP8266 Community Forum members still interested in this project: newest, "Fast_Time_Web_Interface_v4. is attached.

http://weather-1.ddns.net/Weather Website address,

William
Attachments
Updated 04/11/2018
(11.36 KiB) Downloaded 224 times
Last edited by Sirquil on Mon Jan 24, 2022 4:31 pm, edited 2 times in total.