Hi,
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[0].get()); //Pin 0 represent the pin 1.30
this->pins[1].set(true); //Pin 0 represent the pin 1.31
THEKERNEL->streams->printf("Pin 1 :%d\n", this->pins[1].get());
What am I doing wrong?
Thanks in advance for your help!
Nicolas =)
Imported from wikidot