|
|
|
|
|
Re: Need Help: Error when deploy Greenhouse sample on RPi3b [message #1742916 is a reply to message #1742821] |
Thu, 08 September 2016 14:57 |
Wang Murphy Messages: 6 Registered: September 2016 |
Junior Member |
|
|
Hello David,
indeed after I stop and re-start bundle it appears under 'services' menu.
Another issue, the toggle on light doesn't take effect at all, so I download greenhouse source code and found missing read light code in place below (I added the missing code) in 'Pi4JGreenhouseSensorService.java'
_handle = _scheduledThreadPoolExecutor.scheduleAtFixedRate(
new Runnable() {
@Override
public void run() {
try {
float newTemperature = readTemperature();
if (Math.abs(_temperatureRef - newTemperature) > .1f) {
notifyListeners("temperature",
newTemperature);
_temperatureRef = newTemperature;
}
[b]boolean newLightState = readLightState();
if(newLightState != _lightState) {
notifyListeners("light", newLightState);
_lightState = newLightState;
}[/b]
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}, 0, 5000, TimeUnit.MILLISECONDS);
after deploy to RPi, the same issue there, read light state is always returning true, however the LED is off, and I checked the pin state with 'gpio readall', the pin state if off indeed.
I don't know what's wrong there.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04483 seconds