Applied Sensors (Tracy Allen).
MichelB
Posts: 154
Page 113, "Wouldn't it be nice to have the data logger press the button for you, ...". Yes indeed, very interesting, it work very well. Is it possible to add a line as it follows: "Enter interval needed in seconds". If possible, how to do it? Thank you in advance and best regards.
P.S.: If a value > 255 for n (i.e. more than 255 seconds interval) is entered the "timer" does not work!
Please find herewith attached the code, only the display of light has been modified, light * 2 instead of light.
Post Edited (MichelB) : 8/21/2009 1:41:44 PM GMT
P.S.: If a value > 255 for n (i.e. more than 255 seconds interval) is entered the "timer" does not work!
Please find herewith attached the code, only the display of light has been modified, light * 2 instead of light.
Post Edited (MichelB) : 8/21/2009 1:41:44 PM GMT
Comments
Before the DO:LOOP add,
and inside the DO:LOOP change one line:
Does that make sense?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
P.S.: After modification the program does not run due to the fact that there is not enough space for variable, maybe I must reduce number of records? Would you like to try and modify the attached code?
P.S.2: Very sorry for disturbance, in "RAMDataLogger.bs2", Interval· CON· 10, when CON > 255 program does not run. I suppose not enough space in RAM for this constant.
Post Edited (MichelB) : 8/22/2009 4:28:03 PM GMT
Ahhh. One way to free up variable space would be to decrease the size of the data log file, now 18 bytes. Another way would be to move the data log file into the eeprom and thus free up 18 bytes of RAM. Another way is to recycle variables.
The third way first. Change the variable declarations to,
You see, the variable rct is being recycled twice with aliases n and light, and I think you will find that there is no conflict when using that same memory word location for the three different meanings. The program now uses 25 bytes of RAM (one byte remains free).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
The best solution is to store the log file in the eeprom instead of in the RAM. Then of course it would no longer be a RAMDataLogger, but that would free up 18 bytes for expansion in other directions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com