I am coding a module to check if a door is opened or close.For this purpose, I have pin 1.30 configured as an input and 1.31 as an ouput.
Code from config:
door.door_enable true door.door_input_pin 1.30^ door.door_output_pin 1.31
The value of those two pins is always 0.
Here is how I check their values :
THEKERNEL->streams->printf("Pin 0 :%d\n", this->pins.get()); //Pin 0 represent the pin 1.30 this->pins.set(true); //Pin 0 represent the pin 1.31 THEKERNEL->streams->printf("Pin 1 :%d\n", this->pins.get());
What am I doing wrong?
Thanks in advance for your help!