If Raspberry Pi pin [value] is true then ... Else ...

Last modified by Stephan Robinig on 2021/02/19 16:44

Creates an if-else-query. If the specified Pin is true (a.k.a. high or 1) it will continue the script there, otherwise it will continue with the else-brick beneath.

if-raspberry-pi-pin.png

"Else" will be created automatically.

else.png

"End if" will be created automatically and is always the last brick of the if-else-statement.

end-if.png

Beispiel

This script continuously checks the state of pin 15. If the pin is low (0), e.g. no electricity flows, the object is hidden. Else the object is shown.

Bsp_If_Raspberry_Pi_Pin_is.png

Ergebnis

Download

Gif_Wenn_Raspberry_Pi_Pin_ändert_sich_zu.gif