Raspberry Pi 4 Basic GPIO Tutorial with Python

Published: 07 March 2020
on channel: Ace1000ks1975
3,418
31

▒░█▀▓▒█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▀█▒░█▀▓▒
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
[Synopsis]

This video will show you how to connect GPIO pins to a Raspberry Pi 4 single board to a breadboard to create a simple circuit.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

[Code used in video]
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄

[In the terminal]

Go to the terminal first
sudo python //Get into the python shell
import RPi.GPIO as GPIO //Import the GPIO library to your computer
GPIO.setmode(GPIO.BOARD) //Setting the pin numbering system to board.
GPIO.setup(11,GPIO.OUT) //Setting pin 11 as an output function
GPIO.output(11,1) //Green led light is on. 1 is on in binary
GPIO.output(11,0) //Green led light is off. 0 is off in binary

GPIO.output(11,True) //Green led light is on. True is on.
GPIO.output(11,False) //Green led light is off. False is off.
GPIO.cleanup() //Clear out the pins that you used
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
nano OnOff.py

import time
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
green=11
GPIO.setup(green,GPIO.OUT)
GPIO.output(green,True)
time.sleep(2)
GPIO.output(green,False)
time.sleep(1)
GPIO.output(green,1)
time.sleep(5)
GPIO.output(green,0)
GPIO.cleanup()

Ctrl + O
Enter
Ctrl + X
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
[Links]

◙ Raspberry Pi 4 Related Videos
• https://he-1000-1975.com/video-direct...
░█▄▓▒█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█▄█░█▄▓▒


On this page of the site you can watch the video online Raspberry Pi 4 Basic GPIO Tutorial with Python with a duration of hours minute second in good quality, which was uploaded by the user Ace1000ks1975 07 March 2020, share the link with friends and acquaintances, this video has already been watched 3,418 times on youtube and it was liked by 31 viewers. Enjoy your viewing!