项目作者: zacck
项目描述 :
GPIO Input/Output examples for the rpi using nerves
高级语言: Elixir
项目地址: git://github.com/zacck/nerves_io.git
Requisites
- Raspberry PI
- Jumper Wires
- LED
- Push Button Switch
- 10K ohms Resistor
- 560 ohmS Resistor
Steps
- Build a Ground Rail from your raspberry PI we will use this to ground the switch and the LED later on
- Connect one end of your 560 Ohms resistor to ground and the other end to one of the LED legs
- Connect the other leg of the LED to the to a GPIO pin in this example it is GPIO17
- Connect one end of your 10k Ohms resitor to a 5V source and one of the usable legs of your switch
- Connect the other usable leg of your Switch to a GPIO pin in this case GPIO26
Checkout the image below for an example
