1-wire reader & laser sensor

new update
http://www.weather-display.com/downloadfiles/cronlazersnow.zip

I have added button to try and trigger a reading
got no idea if will work

Brian

This what I get when I run the new version and it the “get reading” button. I did it twice which is why there 2 readings.


I am using the original hid component to send the commands (easier)
looks like no new reading was triggered
I will see if I can figure out how to send data using the new HID component

new update ready to test re the trigger a data read

Brian

Here’s the last test. I did hit the “get reading” button several times. I’m heading to bed. Hope you had a good day with the family!

Cheers

MikeyM


that is not working
but I cam compile the LRTimelog
and so make that program run, trigger a reading, and exit (ie get cronlazersnow to run that program at set intervals)

V1.9 is worked for me overnight after opening LRTimelog and starting it to record snow depths every 6 minutes (360 seconds)

I’m looking forward to the next steps as to how to update WD and eventually upload the V1.9 data to my website.

Thank you so much.

Brian,

Mike asked me to tell you that he had to go shopping this morning. He’ll be back to continue testing around 2:30 p.m. our time (EST) or 8:30 a.m. your time.

Thanks for your continuing work and progress! Much appreciated!

Jeff

@schwab
re getting WD to use the snow data
use the latest .zip update
and in setup, advanced/misc, snow section, tick enable for the lazer snow and tick to use the cronlazer snow
and set your needed offset too (you can do that in the cron lazer snow)
and then make sure WD is getting live data from your weather station (or at least set to stationless mode)
and then try adding some fake snow to test?

I have re compile the LRTimelog.exe
(and renamed it as LRTimelogtest.exe)
download
http://www.weather-display.com/downloadfiles/lrtest.zip

run that (double click) and see if it triggers a reading in a runing cronlazersnow.exe

the idea is that I get cronlazersnow to run this program and a user selectable interval

Brian

The LRTimeLogtest.exe does trigger a reading, but if cronlazersnow is running before LRTimelog that it produces an erroneous reading in cronlazersnow. Also the interval you have have set in LRTimeLogtest is 30 sec and the reading has to be 60 sec or greater otherwise LRTimelog quits. So it works but only takes 1 reading which is an erroneous depth.
MikeyM


yeah I hard coded the reading interval
but in the code it does say 30 seconds or longer
what I have done in the code to trigger one reading is added to sleep 10 seconds after turning on the lazer before requesting a reading
I see that that LTtimelog does then look to get a reading back ,…then after that sets the lazer back to sleep and then it should exit…yes?
does the reading it get back look ok? (maybe I can make it report to the terminal instead of to a log)

Brian

LRTimelogtest takes 1 reading an then exits, but because cronlazersnow is started before LRTimelogtest runs it produces an erroneous reading. This has always happened even with the old system using the Dallas 1-wire reader. If we start the Dallas 1-wire reader before we start LRTimelog we would get an erroneous reading - hope this makes sense.

I’m not sure if it would be possible for the LRTimelogtest program to start cronlazersnow after it’s taken it’s first reading.

Ok on the 30 sec. If I try to execute LRTimelog with a time less than 60 secs it gives me an error message that it has to be 60 sec or greater, but I didn’t look at the source code.


how are you executing it with a time less than 60 seconds? (just curious)

so if you run this LRtimelogtest
and then run cronlazersnow
what happens?

It indicates that LRTimelogtest is running, but it doesn’t take any readings. This is a screenshot after LRTimelogtest was running for 5 minutes


My normal command for LRTimelog is LRTimelog (secs) ie 3600 for 1 hour. I run that from the cmd prompt

humm
something not write with my code then…i.e its not triggering a reading…as the test program should exit after it gets a reading
I disabled the run time from running from command prompt and set that as 30 seconds…but even that is not used in the code
what should be happening is it should be turning on the lazer then 10 seconds later setting to take a reading and then waiting for a reading…and once a reading comes back, exit
in theory

try a new update
http://www.weather-display.com/downloadfiles/lrtest.zip

i have added more debug code

Here’s what I’m seeing. I’m a little confused as the .zip included both LRTimelog.exe and LRTimelogtest.exe and this is the results from LRTimelog.exe


So it’s going through the motions ok
As per the debug output…but no reading coming back
What I need to do I guess is go back to the original code and make sure that works first,yes?