- Raspberry Pi Rev2.0
- PIR sensor (connected to GPIO 4 + 17) - I use two pins because then I can assign a rising and falling edge event handler (see the code)
- 2x LED (connected to GPIO 24 + 25)
- 2x 100Ohm Resistor
- (also on the board but not yet in use: temperature sensor)
and the corresponding source code:
To start the script at boot time I use the following initd script:
Keine Kommentare
Kommentar veröffentlichen