Rpi Gpio Usage

The GPIO pins are the small red squares in two rows on the right side of the Raspberry Pi, on the actual Raspberry Pi they are small metal pins. GPIO as GPIO, time from datetime import datetime # Tell the GPIO library to use # Broadcom GPIO references GPIO. In this article, I will make a simple LED blinking project with Raspberry Pi using the GPIO pins. This article uses the built-in RPi. GPIO Module. RPI_GPIO for Pi 1 revision 1. In this chapter we will use another GPIO pin as "Input". Using pins BCM numbers: GPIO. You can vote up the examples you like or vote down the ones you don't like. The Raspberry Pi has 40 GPIO pins that connect to sensors, lights, motors and other devices. GPIO is a Python Library which use to control GPIO on Raspberry Pi. One of the simplest ways to access the GPIO with a “real programming language” (sorry bashers :) is with the RPi. This article documents the pinouts for the first version, and the second version called revision 2. First let’s talk about what is BCM. Given the Raspberry Pi’s excellent. Install avrdude. 3V (Pin 1), SDA (Pin 3), SCL (Pin 5) and Ground (Pin 6) pins from the Raspberry Pi GPIO header to the corresponding pins on the IO Pi Plus. For more details about the GPIO layout, visit the Wikipedia article about the Raspberry Pi. The goal of the GPIO Pins is to add some extensions to your Raspberry Pi For example, most of the Raspberry Pi HATs use these pins to connect with the Raspberry Pi You can also create your electronic circuit by using these GPIO pins with cables, LED and other accessories. All Raspberry Pi since the Model B+ can provide quite a bit more, up to 500mA to remain on the safe side, thanks to a switching regulator. GPIO commands and usage. setup(8, GPIO. These pins are to communicate with other circuitry such as extension boards, custom circuits, and much more. So, you just bought a new Raspberry Pi 2 Model B. GPIO Python library to create scripts for blinking a LED and using a button as input. You should deploy your code to RPi and use it there. GPFSELm is the \(m^{th}\) GPIO register and FSELn is the \(n^{th}\) GPIO pin. Setting Up RPi. py code and associated test programs. GPIO Here is what I got on FreeBSD on a RPi2:-. Wikipedia has a good overview of each pin and its functionality. This is sufficient to power things like LEDs, so you can use the GPIO to create your own experiments. Tools available are Python as the main programming language, with support for C, C++, Java, Perl and Ruby. GPIO as GPIO ImportError: No module named RPi. The default is to use RPi. Control LED Using Raspberry Pi GPIO. The following clock sources are available:. In this tutorial, we're going to be introducing and using the GPIO (General Purpose Input Output) pins on our boards. pigpio - A module to control the Pi's GPIOs, PWM for servos, LEDs, and motors, gpio level change callbacks, software serial, and much more. We’ll be using this watchdog board. The LED is any generic LED you may have - typically 5mm diameter and the resistor is 330Ω. setwarnings(). Placeholder package to emulate RPi. setup(8, GPIO. Turning GPIO pins high and low on a Raspberry Pi 3 using. I also explain in depth the concept of pull-up and. Any maker who uses the Raspberry Pi will almost certainly be familiar with the Python GPIO module (dubbed RPi. Note that this will only clean up GPIO channels that your script has used. Choose a number that does not conflict with any of the GPIO number of the Raspberry Pi. I'm concerned that I may be trying to use a GPIO pin. I'm trying to drive a STP16FN06 from a Raspberry Pi GPIO pin but I'm a bit lost. Via the Pi terminal, type: sudo apt-get install python-rpi. setmode() GPIO. In the video we display a Raspberry Pi GPIO pinout diagram. GPIO 35 & 47 are not available on Raspberry Pi 3. If using the pull-up resistor, no external resistor is needed and the switch should be connected between GPIO pin and ground. It does retain the physical form of the Raspberry Pi 1 Model B+, so you should be able to select from the many snazzy cases that already exist for your new Pi version 2. The GPIO package bundled with Raspbian is aimed at Raspberry Pi beginners who are familiar with Python and interested in designing IoT products. digitalRead(pinnumber);. Using pins BCM numbers: GPIO. #!/bin/sh gpio mode 7 out while true do gpio write 7 1 gpio write 7 0 done Python with RPi. Here is the GPIO input circuit that I came up with using an opto-coupler for protection. In the Raspberry Pi Bluetooth tutorial, we are going to control the GPIO pins of Raspberry Pi through the Android App over the bluetooth. GPIO library and sets GPIO as a local name in the script; Sets the pin-numbering scheme for the script (The GPIO. Setting Up RPi. This function will allow us to set the pin as either input (GPIO. My next video then builds on this. By default Raspberry Pi’s UART pins (GPIO 14 and 15) are configured as a serial console. First let’s talk about what is BCM. Unlike some other solutions for using the Raspberry Pi's GPIO pins, wiringPi provides access to more advanced features, such as enabling the internal pull-up or pull-down resistors. Created by Ben Nuttall of the Raspberry Pi Foundation and other contributors it is released under an MIT-type free software license. For all of you, this tutorial will show you how to use an I2C Port Expander to easily multiply the GPIO pins many times over. Use the wiringPi library of C functions to control the RPi's GPIOs in an efficient and accessible manner. If your circuit requires 3. Buy products related to raspberry pi 3 gpio pin products and see what customers say about raspberry pi 3 gpio pin products on Amazon. This includes WS2812 and SK6812RGB RGB LEDs Preliminary support is now included for SK6812RGBW LEDs (yes, RGB + W) The LEDs can be controlled by either the PWM (2 independent channels) or PCM controller (1 channel) or the SPI interface (1 channel). It will show you how to automatically run a program when a button is pressed (a GO button for a robot, for instance), or use it as part of your program. Using pins BCM numbers: GPIO. A pigpio pin factory can be used on its own (simply use the pigpio library instead of RPi. Welcome to Pi4J! This project is intended to provide a friendly object-oriented I/O API and implementation libraries for Java Programmers to access the full I/O capabilities of the Raspberry Pi platform. A Raspberry Pi (I’ll use the Pi 3 Model B here, but any model with GPIO pins will work — if you want to use the Pi Zero you’ll need to solder some headers onto it). In this guide we will show you how to control the GPIO pins of a Raspberry pi by send a SMS to the Raspberry Pi from a mobile phone. import gpiozero Using The RPI. A BIG feature of the Raspberry Pi is the GPIO pin array. When programming the GPIO pins there are two different ways to refer to them: GPIO numbering and physical numbering. One good thing with MCP23x17 is that you can use either I2C or SPI, or both! You can also use PWM controllers such as PCA9685. The following example demonstrates the simple control of a GPIO pin on the Raspberry Pi. This installation can be done in two ways which is as follows, WiringPi Library Installation Way 1. Source Code. Protocol and base logic ported ported from rc-switch. Thankfully this library is now including in the standard Raspbian image available from the Foundations Download Page. Raspberry Pi Tutorial: How to Use Push Button: In this tutorial you will learn how to switch on your LED using a button with your Raspberry Pi. The Raspbian Jessie 2015-05-27 release or above has RPi. I have a Raspberry Pi that I want to use to detect if my desktop computer is on, by detecting if the 5V rail is powered. A powerful feature of the Raspberry Pi is the row of GPIO (general-purpose input/output) pins along the top edge of the board. Freeing up UART pins on Raspberry Pi GPIO. Use the Raspberry Pi GPIO Pins as Digital Inputs and Outputs. After the CPU Core temperature exceeds a specific temperature, the fan starts spinning. In addition to the usual computer features, it has two GPIO ports with a total number of 21 pins that can be set (on / off) or read. As you probably know, the Raspberry Pi is a family of low cost single-board computers developed primarily for education by the non-profit Raspberry Pi Foundation. The first import is, RPi. However, Pi4J does not provide any remote transport capabilities, you would have to add that to allow your Android app to communicate with the RPi. The pin placements correspond with the table below. The sensors used by the Raspberry Pi to measure the Physical Quantities can be of various types. In this Tutorial, you will learn about Raspberry pi GPIO control. 3V (Pin 1), SDA (Pin 3), SCL (Pin 5) and Ground (Pin 6) pins from the Raspberry Pi GPIO header to the corresponding pins on the IO Pi Plus. Python API and Examples RPi. A great starter hardware project using the Raspberry Pi is hooking up a simple tactile switch to the Raspberry GPIO and detecting button presses in Python. The Raspberry Pi. BCM) #or to use the physical pin numbers (1-40) instead of GPIO number #GPIO. The NuGet Team does not provide support for this client. GPIO does not work in Ubuntu Mate 15. Unlike Scratch's graphic-based program blocks, Python uses entirely text-based instructions. Android Things GPIO pins are used to control peripherals. Note that this module is unsuitable for real-time or timing critical applications. In the video we display a Raspberry Pi GPIO pinout diagram. GPIO in python scripts but always need to run IDLE as root on the Pi before the scripts will run. RPIO - Advanced GPIO for the Raspberry Pi. Since the Pi only tolerates a maximum of 5V (the GPIOs even only 3. GPIO as GPIO. GPIO is a popular Python library used on Raspberry Pi platforms to control GPIO pins. sleep variable (edited to 0. This guide will guide you through setting up the circuit with the Raspberry Pi and reading the state of the button in Python. A powerful feature of the Raspberry Pi is the row of GPIO (general-purpose input/output) pins along the top edge of the board. Pin Numbering. GPIO module as the driving force behind our Python examples. In this article you learn how pir motion sensor works and how to use it with arduino and raspberry pi PIR complete guide tutorial python by Electropeak. If you want to see the kinds of photos that can be taken on the Raspberry Pi Point & Shoot camera, I put and album up showing a set of pictures I captured after making the first version of it. After everything finishes you should be all set and ready to use the RPi. It's also a great item for hobbyists. Simple-gpio-flow. Raspberry Pi GPIO. This is very useful for debugging problems with circuits connected to GPIO pins. Use PWM to control the width of pulses to a servo motor to change its angle. In the video we display a Raspberry Pi GPIO pinout diagram. Although the mapping schemes are fixed, there is one mapping which brings out RTS of the on-board serial port of the RPi to a GPIO pin. In my last post I mentioned my interest in using the Raspberry Pi as a microcontroller. SPI To enable the /dev/spidev* devices, uncomment the following line in /boot/config. The LED is any generic LED you may have - typically 5mm diameter and the resistor is 330Ω. We will use the GPIO pins of Raspberry pi as OUTPUT pins. GPIO API -- An overview of the Python functions you can use to drive GPIO. If you would like this to use for future reference, then be sure head over the guide. import gpiozero Using The RPI. This line can then be used to indicate to an external controller a 3. RPI_REVISION Revision of the Raspberry Pi board as detected (either 1 or 2) VERSION Version of the Lua module HIGH for setting outputs and reading inputs (see output and input) LOW for setting outputs and reading inputs (see output and input) OUT Pin configuration, see setup_channel and gpio_function. To use GPIO library in python start your program with Rpi. Install avrdude. The problem I'm having is that it looks like switching the relay is introducing noise in to the GPIO input and creating false positives. Python (RPi. A powerful feature of the Raspberry Pi is the row of GPIO (general-purpose input/output) pins along the top edge of the board. I don't believe we can put all three devices on the one hardware i2c. From the pure GPIO control, via a surface for home automation to the monitoring server for individual services or sensors. Thankfully this library is now including in the standard Raspbian image available from the Foundations Download Page. This is very useful for debugging problems with circuits connected to GPIO pins. Does the BCM library serve the same purpose as the RPi, and what is the benefit of using one over the other?. Pins become Python objects, which must be set up before use. Learn how to use Python and Shell scripts to control GPIO ports on the Pi B. You can also use wiringPi on the command line. GPIO and although the latest versions of this library work with the Raspberry Pi2, the NOOBS distribution contains an older version of RPi. This library called gh_rpi is available for Lua and for Python. The use of OSGi Services to use GPIO provides several important advantages: The OSGi Service Interface provides a simple and clear yet flexible software abstraction Clear Contract Between Service Producer and Service Consumer; Loose Coupling and High Cohesion. The size of the adapter is kept as small as possible and should fit into most existing cases. For all of you, this tutorial will show you how to use an I2C Port Expander to easily multiply the GPIO pins many times over. Control LED Using Raspberry Pi GPIO. To use GPIO library in python start your program with Rpi. It was first released in 1988. GPIO I installed it with the command, but I also tried virtualenv and sudo: pip install RPi. These letters stand for light–emitting diode. For the platform configurations, please check their corresponding sections. Pin 6 (Ground) will be connected over the Transistor. 3v, GPIO-0, GPIO-1, GPIO-4 and GND on my rev. GPIO as GPIO # Import Raspberry Pi GPIO library from time import sleep # Import the sleep function from the time module GPIO. Is it possible to use RPi. Raspberry Pi 3 GPIO: pushbuttons, LEDs for RC and BARR Sparkfun also sells a larger assortment of tactile buttons but the Raspberry Pi 3 starter kit includes one each of red, yellow, green. JTAG is a standardised interface for debugging integrated circuits which you can use to debug your Raspberry Pi. GPIO Module. The php-gpio project , for example, provides a dedicated PHP library for accessing GPIO pin on Raspberry Pi. Enabling or disabling the SPI and I2C interfaces changes the availability of specific pins for use as GPIO pins. Python API and Examples RPi. From the pure GPIO control, via a surface for home automation to the monitoring server for individual services or sensors. Edge of Raspberry Pi board is to the right. 2+) Background and simple interrupt: How to use interrupts with Python on the Raspberry Pi and RPi. Note that PWM will also stop if the instance variable 'p' goes out of scope. For example, for an LED blink example, you can use this code. GPIO Zero builds on a number of underlying pin libraries, including RPi. You can also use wiringPi on the command line. Setting Up RPi. Learn how to write Python with the RPI. Raspberry Pi GPIO Pin Usage Raspberry Pi GPIO Pin mapping and connections Created: 02/10/2015 | Last Updated: 02/10/2015. This is a step that can be frightening when you start. GPIO, it is now generally recommended to use it for new programming. Using the BCM format we use: import RPi. The Pi's GPIO ports can be controlled from the command line (i. GPIO cheat sheet; RPi. While newer than Rpi. The second import is, SimpleMFRC522. 1 on a raspberry pi. ) Using interrupts takes only three steps: Create a function to be called when the GPIO pin changes state. (The waitForInterrupt function is deprecated and should not be used. Step – Connect Relay to Raspberry PI. 4GHz-only wireless chipset. The Pi Supply GPIO to FPC Breakout pHAT for the Raspberry Pi makes it possible for you to bring out the 40 pin GPIOs of the Raspberry Pi to a display ZIF/FFC connection, which is more commonly used for displays. Raspberry Pi has many GPIOs that can be used to control and sense the physical world in a digital way. share | improve this answer. Adafruit Industries, Unique & fun DIY electronics and kits : Pi HATs & Bonnets & add-ons - Tools Gift Certificates Arduino Cables Sensors LEDs Books Breakout Boards Power EL Wire/Tape/Panel Components & Parts LCDs & Displays Wearables Prototyping Raspberry Pi Wireless Young Engineers 3D printing NeoPixels Kits & Projects Robotics & CNC Accessories Cosplay/Costuming Halloween Reseller and. The GPIO ports are scattered about the header haphazardly, interspersed with 3. Using Alexa voice service, we can play music, get information about weather, book tickets and many more. The GPIO pin used in the example code is GPIO_17, which appears on pin 11 of the Raspberry Pi’s 26-pin expansion header (opposite GPIO_18 (PCM_CLK) and beside GPIO_21 (PCM_DOUT)). GPIO is Raspberry-specific and you really cannot use it on your computer - it even has no GPIO ports. DelayMicroseconds() is a handy function but if you use it a lot you'll find operation takes much longer than it should. On every RapberryPi that you want to use you must have pigpiod daemon running!. Streaming Internet Radio Based on Raspberry Pi. In other words, you can use it to read the current value of a pin, but it won’t let you know when the value of a pin. The chip controlling the GPIO on the RPi knows of three pre-defined mappings. Our Raspberry Pi Expansion boards use either the I2C pins, UART or SPI pins on the Raspberry Pi 's GPIO header. setup(4,GPIO. GPIO), but if an IP address is provided too, this can be used to remotely control a Pi's pins. This line can then be used to indicate to an external controller a 3. The purpose of this application is to demonstrate ThingsBoard RPC capabilities. _ GPIO import * ImportError: No module named _ GPIO If I install the original RPI. GPIO library is now installed in python, but it won't be loaded by default. GPIO music box Electronic components Raspberry Pi Python Print this project. Driving a DC Motor with Raspberry Pi Using a Dual H Bridge DC Stepper Motor Drive. 4GHz-only wireless chipset. In mid-November 2013 I moved to a new kernel which was locally compiled with an option to improve NTP performance. In a previous blog, I mentionned how to get WiringPi on the Pi. This allows a program to read in what is happening to the signals on the GPIO lines. At its corners the board provides holes for spacers, locking posts, or other tightening setups. Learn how to add a relay to your Raspberry Pi. * = Raspberry Pi 2 ONLY. Next, tell Python which numbering system you are going to use to reference the pins on the Raspberry Pi board, BCM or BOARD. from a line of code that gets run many times with different pins. The Raspberry Pi Model A+ and B+ boards, and the Pi 2 Model B, have a 40-pin header marked J8, arranged as 2x20 pins. com FREE DELIVERY possible on eligible purchases. The General Purpose Input / Output (GPIO) pinout is almost the same for Rev 1 and Rev 2 versions of the Raspberry Pi due to them having the same BCM2835 processor. In this chapter we will use another GPIO pin as "Input". Connecting up the display is fairly straight forward, it's designed so that the Pi can be mounted on the back of it with all of the cables tucked away nice and neatly. Choose a web site to get translated content where available and see local events and offers. mikado79 wrote: Hi, I have a raspberry Pi and can access the GPIO Ports with python but how do I do it from scratch, please? Thanks to anyone who can help or at least point me to some reading matter on the subject. GPIO will be used to program Raspberry pi GPIO from time to time. I looked at the example code for doing I/O using the GPIO pins, but I need to be able to count impulses (between 0. Click the image for an enlarged version: Here is the Raspberry Pi 4 default GPIO pinout for the 40 pin J8 header. The Raspberry Pi talks to the outside world through the general-purpose input/output device, also known as the GPIO. C++ is an advanced language that includes many features, such as classes, objects. Working Subscribe Subscribed Unsubscribe 72. BOARD), we are selecting the Physical Numbering Scheme. cleanup() also clears the pin numbering system in use. GPIO library, it is possible to very easily generate RF frequencies using the Raspberry Pi clock pin GPIO 4, however the wave forms generated are square waves and as such contain multiple strong harmonics, and there appears to be an upper limit in frequency of 9. These pins act as an interface between Raspberry Pi and the physical world. documentation > usage > gpio GPIO. Any maker who uses the Raspberry Pi will almost certainly be familiar with the Python GPIO module (dubbed RPi. Now in this tutorial we will see how we can use the on-board GPIO Pins. We will observe GPIO control using LEDs connected to the pins. Current GPIO state and GPIO control widget is visualized using built-in customizable dashboard. I'm attempting to mock RPi. Raspberry Pi Tutorial: How to Use Push Button: In this tutorial you will learn how to switch on your LED using a button with your Raspberry Pi. One good thing with MCP23x17 is that you can use either I2C or SPI, or both! You can also use PWM controllers such as PCA9685. You can use the functions in this library to control GPIO pins in your own programs. This light sensor module has 3 wires: VCC, GND and Signal. If the request is true, then the server responds with the help of the relay and GPIO pins to On/Off the switch of the respective object. It is powerful enough to run a full Linux operating system, comes with Java SE pre. GPIO I installed it with the command, but I also tried virtualenv and sudo: pip install RPi. Here we using Python programming language. The Raspberry Pi's 40-pin GPIO connector often gets overlooked. In addition to GPIO control, it is also used by many other libraries to query the Raspberry Pi hardware version as header pin layouts differed between certain versions. Learn how to control GPIO pins and operate relays with the Raspberry Pi. GPIO – part 2; Multiple threaded callback: How to use interrupts with Python on. For this guide, the GSM modem we are using to receive the SMS is the BerryGPS-GSM. You should deploy your code to RPi and use it there. Buy products related to raspberry pi 3 gpio pin products and see what customers say about raspberry pi 3 gpio pin products on Amazon. Raspberry Pi GPIO Pinout: What Each Pin Does on Pi 4, Earlier Models. GPIO with Python. Since the documentation specifies the GPIO descriptor as a property named -gpios, a grep of the directory arch/arm/boot/dts for the string "\-gpios" reports many possible examples. Just, we should include library in our program to use functions for GPIO access using Python. In this tutorial, we're going to put together what we've learned so far to create a garage stop-light. GPIO, it is now generally recommended to use it for new programming. In order to use these GPIOs, first we need to get ourselves familiar with the pin number definitions, mainly, WiringPi Pin and BCM GPIO conventions. As it's a Python program, the libraries must be imported. You don't need network connectivity to get this going but its handy so if you can configure WiFi or Ethernet thru a USB adapter, do that too. You can discuss this video on YouTube. About the module. GPIO Zero builds on a number of underlying pin libraries, including RPi. A newer GPIO library for the Raspberry Pi is gpiozero [4]. A detailed tutorial on using Raspberry Pi GPIO pins. Thankfully this library is now including in the standard Raspbian image available from the Foundations Download Page. Rs-pi–L293D-3 6 Motor Board - Control Robot Arm 5 Motor (M1,M2,M3,M4,M5) 2. December 2018. This function will allow us to set the pin as either input (GPIO. You should deploy your code to RPi and use it there. One way to connect the Raspberry Pi and Arduino is by connecting the GPIO on the Raspberry Pi and the Serial Pins on the Arduino. This is called polling, and it's not very efficient because the program can't do anything else while waiting for the button to be pressed. Follow the following steps to install it on Raspberry Pi,. js with the onoff module to control the GPIO. In this tutorial, we're going to put together what we've learned so far to create a garage stop-light. Raspberry Pi - How to use the GPIO RaspberryPiIVBeginners. If you go up a folder you can see the other files its associated with on that project. This library called gh_rpi is available for Lua and for Python. The first important function of the RPi. HATs are a great way of extending the capabilities of your Raspberry Pi to use in a project without having to wire up or solder components. Manipulate your Raspberry Pi's GPIO pins from Ruby! Boolean input/output; Software-driven PWM (written in C for speed) Up-to-date with RPi. GPIO and other, similar libraries. The second import is, SimpleMFRC522. I'm concerned that I may be trying to use a GPIO pin. In this post I show how to control the GPIO on a Raspberry Pi using a touchscreen. Basic Commands. Your Raspberry Pi is more than just a small computer, it is a hardware prototyping tool! The RPi has bi-directional I/O pins, which you can use to drive LEDs, spin motors, or read button presses. The circuit: Notice that the GPIO numbers for the pins don’t relate to the physical pins on the GPIO header, so take care to map them correctly when wiring and programming. js GPIO implementations. The function setmode tells RPi. I have a Raspberry Pi that I want to use to detect if my desktop computer is on, by detecting if the 5V rail is powered. RPi::PIGPIO - remotely control the GPIO on a RaspberryPi using the pigpiod daemon. Python version 2. Does the BCM library serve the same purpose as the RPi, and what is the benefit of using one over the other?. Once you have your devices hooked up, it is time to install avrdude. This post is intended to help people address these pins correctly. The Raspberry Pi is a single board computer (SBC) that has some microcontroller-like capabilities (most notably basic GPIO), however it runs Linux (or optionally other operating systems) on its ARM processor. A relay is an electrically-operated switch. Using Alexa voice service, we can play music, get information about weather, book tickets and many more. In the subsequent tutorials, the RPi. See the section on changing the pin factory. Using pins BCM numbers: GPIO. How to use GPIOs on raspberry pi (Simple I/O, PWM and UART) How to use GPIOs on raspberry pi (Raspbian-Wheezy) Taka a look at the GPIO header information of the raspberry pi, you can find it in the next links:. A great feature on the Raspberry Pi is the GPIO pins (stands for G eneral P urpose I nput O utput). 6 (wheezy)) TMP102 I2C temperature sensor; Method to connect Raspberry Pi to internet. This is research code, and any fitness for a particular purpose is disclaimed. The Raspberry Pi has 40 GPIO pins that connect to sensors, lights, motors and other devices. For the (older) Rev2 Model A and B RPi's this GPIO. See Changing the pin factory and Configuring Remote GPIO for more information. Connect the end of the ground chain to one of the Raspberry Pi's GPIO ground pins. I like to take one of these the Jams in case someone needs help and I can't remember the necessary commands. Pointing Difference. Controlling DC motors from your Raspberry Pi is quite easy! Whether you want to control a single motor or build a Raspberry Pi NERF tank, the principles are the same -- but the hardware needed will vary. GPFSELm is the \(m^{th}\) GPIO register and FSELn is the \(n^{th}\) GPIO pin. simulate this circuit – Schematic created using CircuitLab. A module to control Raspberry Pi GPIO channels. The following are code examples for showing how to use RPi. GPIO PWM Six Wire H-Bridge.