![]() Now I can have a better appreciation for that second set of eyes. Yes, seems like Java sorts the files in such a way that everything works fine without the loop until Monday rolls over. Just wanted to make sure, that the hopefully informed respondants to this issue, know that the obvious solution (storing seven day records), is unfortunately not available to me. This log application stores privy information about end-users at locations across the country in the event that there are support issues that need to be resolved, and the agreement is that we store this information no more than three days. Changed Logger.java from a +static+ class to a +local+ class Verified that the call to *readOnly()* does not alter the +modified+ date on the log files Second call to *directory.listFiles(filter)* and setting *SIZE* to *3* after the old files have been set to read-only Removing the synchronized keyword from the *log(String param)* method Using another variable integer for the *readOnly()* method Turns out, the JRE skips the execution of my for loop in the *reconcile()* method when the date rolls over to Monday, and from then on it simply deletes the previous day's log instead of the oldest log. Ok, easy visual, this is the "log/" directory as I run the Log.java application repeatedly and iterate the date on my computer as I do so. The sample code is a simple logging application, watered down to the bare minimum for the purposes of this forum: does not execute parts of my code, and throws no exceptions. However, a number of times I have run across instances where the JRE simply. Someone has almost always run across the issue before, so there is no need to reinvent the wheel, or solution as it were. I have been a software engineer for a number of years now, and thus far I have never come across any coding issues that truly merit a post such as this. 1.7K Training / Learning / Certification.165.3K Java EE (Java Enterprise Edition).7.9K Oracle Database Express Edition (XE).3.8K Java and JavaScript in the Database.Serial.print ("Led: ") // not in manual - part of serial monitor Serial.begin(9600) // not in manual - added to monitor LED progres The final code is: const int switchPin = 8 The LED refused to light up at 600000 ms (10 min) intervals.Ĭoding instruction 6 in the manual reads : long interval = 600000 Ĭhange this to: - unsigned long interval = 600000 ![]() The code in the manual had to be changed to work. All you need to do is set your serial console to 9600 baud and run the program.I have every confidence the problem will reveal itself. Now you can see if the switch is triggering or not. Serial.println("The switch was triggered") // And this line All that stuff about adding "UL" to it was a waste of everybody's time - which could have been avoided by telling everybody what a "Digital Hourglass" is in your first post and linking to that code ) A lot of other people have used that value with no problems. I also happen to know that the original code ( here) also uses the value "600000". I've also been coding for 30-odd years so I can look at the code you posted and know with 99.999999% confidence that that's not where the problem is. The project will not execute the first step which is to take place in 10 minutes. It's not just a case of running the code, we also have to connect up LEDs and all sorts of stuff. I have posted you the code exactly as I have captured it so that you could run it on your side I'm not working for Arduino, I receive nothing for this. I do not know if you are just volunteering information or if you are actually working for Ardunio.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |