This commit is contained in:
Nox Sluijtman 2022-10-14 14:02:39 +02:00
parent 19571ee383
commit 182c1db205

View file

@ -21,7 +21,7 @@ The solution was an [Olimex PWR-switch](https://www.olimex.com/Products/Duino/Sh
Setting it up was relatively easy.
First I connected my lamp to a European extension cord socket to a random power cable I still had laying around.
First I connected a European extension socket to a random 230 volt cable I still had laying around.
Then I hooked that up to my PWR-switch and plugged my lamp into that contraption.
From there I got little bag of jumper wires from my local electronics store and hooked up the PWR-switch to my Raspberry Pi.
@ -30,7 +30,7 @@ I hooked up the PWR-switch's positive to `GPIO 15` and it's ground to the preced
_Note_, `GPIO 15` is in reference to pin number 10 and the preceding ground pin is pin number 6.
From there I looked up how to send power to `GPIO 15` in order to have it switch to on.
From there I looked up how to send power to `GPIO 15` in order to have it toggle to the "on" state.
The first step to this end is to initialise the pin.
This can be done with:
```sh