blinking an led with raspberry pi

import RPi.GPIO as GPIO # IMPORTANT: remember to change the gpio pin (18) also it needs to be programmed in Thonny Python IDE
import time #used in raspberry pi model 4

GPIO.setwarnings(False) #NOTE: raspberry pi could be updated, and you might need to change your code
GPIO.setmode(GPIO.BCM) 
GPIO.setup(18, GPIO.OUT)


while True:
      GPIO.output(18, True) 
      time.sleep(1) 
      GPIO.output(18, False) 
      time.sleep(1) 

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
led blinking code for raspberry pi raspberry pi blinking red light how to blink a led in raspberry pi raspberry pi 3 blinking red light raspberry pi 4 display blinking led blinking raspberry pi led blinking using raspberry pico blinking led raspberry pi raspberrypi blink led rpi blinking led raspberry red light blinking pi red light blinking rasbery pi 3 blinking red light raspberry pi orange led not blinking raspberry pi 4 blinking red light led blinking simultaneously using raspberry pi led blink program for raspberry pi raspberry pi led blink circuit programming raspberry pi led blink with laptop programming raspberry pi led blink with pc led blinking using raspberry pi raspberry pi blinking raspberry pi act light is blinking how to blink led with raspberry pi led blinking code in raspberry pi make led blink on raspberry pi 4 make led blink on raspberry pi blink led with raspberry pi raspberry pi program for led blinking raspberry pi 3 blinking board led raspberry pi red light blinking raspberry pi led blink python code blink led on raspberry pi blink raspberry pi raspberry pi 3 blinking led error code light an led through python program raspberry pi 3 led blink code raspberrypi blinking led python raspberry gpio blink raspberry pi gpio blink led raspberry pi red and green light blinking how to implement blink in python raspberry pi python make led blink programme for blinking a led in python blinking in built led raspberry pi how to make 2 lights blink with the GPIO pins with python python programming to gpio blinking led like blink blink blinnnnnnnnk python programming to gpio tatatatata blink led raspberry pi 4 led blink code raspberry pi blinking led circuit diagram Draw the circuit diagram to connect LED to Raspberry-pi and Write a python script to Light an LED. Draw the circuit diagram to connect three LED in series to Raspberry-pi raspberry pi 3 led blink blink led raspberry pi Write a Program to blink LED connected to GPIO 20 @2hz raspberry pi led blink how to blink an led using raspberry pi and python rapserry pi led blink Raspberry pi3 blibking bulb led blink raspberry pi python led blink raspberry pi blinking led python raspberry pi use gpio for blinking lights 5 times led blinking in rpi blink in rpi for loop blink in rpi led blinking code for raspberry pi python python raspberry pi blink led GPIO led code python led blinking program using raspberry pi raspberry pi 3 led blink python code blinking led using raspberry pi blink led using raspberry pi 3 blink led rpi blinking lights in python raspberry pi blink led python led blink python raspberry led blink python script raspberry pi led Write a python program to turn ON an LED for 10 sec after every 2 seconds using Raspberry Pi. python blink python code to blink led in raspberry pi blink in python blinking python 3.5 3 python raspberry pi blink led control led with raspberry pi using python raspberry pi 3 b+ python led is not blinking raspberry pi 4 blink led how to make a led flicker with raspberry pi raspberry pi led blink code python program for led blink gpio blinking an led with raspberry pi
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source