smitae Geschrieben January 19, 2017 at 20:46 Geschrieben January 19, 2017 at 20:46 Evening I running the java weather station app with some small changes to output the data to a file. I run it on Centos 7 box as a deamon. Al is fine when there is light. But when it is dark the Ambient Light Bricklet gives the following measurements back; 181909 1 181909 1 181909 1 181909 1 181909 etc etc I think the code is correct, so any ideas what is going on? Thanks Allan Zitieren
photron Geschrieben January 20, 2017 at 13:36 Geschrieben January 20, 2017 at 13:36 I just tested this and it works. Can you show your code and describe your hardware setup in more detail? Do you only have a Master Brick with an Ambient Light Bricklet 2.0, or du you have a full Weather Station Kit? Zitieren
smitae Geschrieben January 20, 2017 at 17:12 Autor Geschrieben January 20, 2017 at 17:12 I have the full Weather Station Kit. I altered the WeatherStation java code, added an output-to-file option, changed some callback timers. Also removed the LCD part, as I want to control that via an other program. I am not a real java developer, so possible I made a mistake in the code? Code attached. WeerStation_Inside.java Zitieren
photron Geschrieben January 23, 2017 at 09:41 Geschrieben January 23, 2017 at 09:41 Your program looks okay. In what time intervals do you see this pattern? Maybe you have a blinking LED in the vicinity of the Ambient Light Bricklet 2.0? Zitieren
smitae Geschrieben January 23, 2017 at 15:51 Autor Geschrieben January 23, 2017 at 15:51 Ok, Ever 30 secs. It reports 1 then 181909, etc, etc. Only possible LED's could be from the Master brick I think? The bricklet looks out in my garden, I do not think there is any light source. But in the end, as this only happens during the night, I could tweak the program to ignore the 181909 value after sun-set? Rg. Allan Zitieren
photron Geschrieben January 24, 2017 at 16:11 Geschrieben January 24, 2017 at 16:11 Can also see this effect in Brick Viewer? Zitieren
smitae Geschrieben January 24, 2017 at 18:40 Autor Geschrieben January 24, 2017 at 18:40 No, that just gives 0 back during the night. So I assume it has to do with the java code changes or possible something else on the centos box. Was planning to run the orgininal weather-station java code and only add out to file and see what happens. If that works, then it must be something in the code. Also looking at possible trying the php weatherstation code, do the same changes as I did with the java code, just to see what happens. Hope to do that next week, bit busy with work. Hobby has to wait :-( Zitieren
smitae Geschrieben February 4, 2017 at 21:28 Autor Geschrieben February 4, 2017 at 21:28 Ok, looks like the problem is gone. When it gets dark the Illumination drops to 1 and there is no change in light level measured anymore. And in the morning when the light level starts to change it starts to log again. I removed the power from the weatherstation and reconnected it after a while. Did that twice and after the second time the problem was gone. Not sure why, but it works and and I am happy. Zitieren
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.