When Raspberry Pi pin [option] changes to [option]

Last modified by admin on 2023/11/27 20:27

Waits until the specified Pin changes its state to the specified value and executes the script. High corresponds to the value 1 and low to the value 0.

set-raspberry-pi-pin.png

Example

This script sets pin 16 to high (1). If the button is pressed electricity can flow and the led lights up.
At the same time the object in the app disappears, because pin 15 recieves electricity and therefor also is set to high (1).

Bsp_When_Raspberry_Pi_pin_changes_to.png
Bsp_When_Raspberry_Pi_pin_changes_to_2.png
Bsp_When_Raspberry_Pi_pin_changes_to_3.png

Result

null4.png