install/update GPIO (GeneralPurposeInputOutput)
https://sourceforge.net/p/raspberry-gpio-python/
sudo apt-get update
sudo apt-get install python-rpi.gpio python3-rpi.gpio
pinout
you need:
- 300 ohm resistor
- LED
- Breadboard
- jumper cables
add pic of circuit
start python the IDE:
python
enter every line with a return
import RPi.GPIO as IO
IO.setmode(IO.BCM)
IO.setup(18,IO.OUT)
IO.output(18,IO.HIGH)
or
IO.output(18,1)
or
IO.output(18,True)
you need:
- 10k ohm resistor
- button
- jumper cables
- Breadbard
add pic of circuit
start python the IDE:
python
enter every line with a return
import RPi.GPIO as IO
IO.setmode(IO.BCM)
IO.setup(4,IO.IN)
get status of the pin:
IO.input(4)
button connected to pin 4. button not pressed returns 0 - button pressed returns 1
https://imgur.com/a/gdOHATE url almost spells godHATE^^
https://imgur.com/a/uGHfP1S