everycook / EveryCook_RaspberryPi_Daemon

A Deamon, written in C to read the EveryCook sensors and control the actors. It is made to work with the EveryCook Raspberry Pi Shield.
5 stars 4 forks source link

Pin_SafetyChain #41

Open everycook opened 10 years ago

everycook commented 10 years ago

Could you test the safety chain pin? If low it should turn off the whole safety chain and shut down the green leds, right? I tried to modify it in watchdog.c line 62, no visible changes.

swerder commented 10 years ago

Correct, if its off all lights should go out. The variable "saftyChainOff" on line 62(set to false) only say that the saftyChain is currently ON (off=falls -> on). (Its a variable that will be manually updated each time the value on pin is changed, so do not always update pin if not needed.) To disable the safty chain, you can simple Stop the deamon, and after some amount of time(watchdog.h, NODATA_TIMEOUT_SAFTY_CHAIN_OFF 10000 => 10 sec) it will go off. To do it in programmatic way, you have to comment out the "digitalWrite(PIN_SafetyChain, HIGH);" in line 61 ( and 93), or write LOW to it.