Summer training at Goeduhub Technologies-Jaipur
Register for Free Certified Workshop on AI & Machine Learning:: 23-02-2020 ||  Career options for aspiring CS/ITECEEE or EIC or EEE Engineers
0 like 0 dislike
40 views

1 Answer

0 like 0 dislike
by (6.7k points)
 
Best answer

Hardware requirements:

  1.        Raspberry-PI
  2.        Power adepter
  3.        SD Card (Minimum 16 GB, with OS for Raspberry-PI)
  4.        3 standard 5 Mm LEDs
  5.        3, (270 OHM) Registers to connect these LEDs to RASPBERRY-PI
  6.        4 Jumper wires (Male to Female; Female end to connect with RASPBERRT-PI; Male end to connect with breadboard)

LED GPIO Connection

LED connection with Raspberry-PI's GPIO

1.       First connect pin no 7 of RASPBERRY-PI to breadboard using Jumper wire.

2.       Breadboard connections:- the top and bottom rows of holes are connected horizontally while the remaining holes are connected vertically.

3.       For LED long end is Positive and short end is negative.

4.       So longer end of LED will connect to GPIO pin no. 7 of RASPBERRY-PI.

5.       Now take a register and connect it to negative end of LED.

6.       Now take a jumper wire and connect it to negative end of LED to RASPBERRY-PI’s ground through register.

3LED-Raspberry-PI-IOT-Training-in-Jaipur

7.       In same way connect 2nd & 3rd LED to RASPBERRY-PI.

Python Program

 Import RPi.GPIO as GPIO  # Install Raspbian from latest NOOBS to ensure you have the GPIO library

Import time   #  importing "time" module for time operations

GPIO.setmode(GPIO.BOARD)

GPIO.setup(7,GPIO.OUT)  # it will use 7 no. Pin of RASPBERRY-PI as output.

GPIO.setup(11,GPIO.OUT)  # it will use 11 no. Pin of RASPBERRY-PI as output.

GPIO.setup(13,GPIO.OUT)  # it will use 13 no. Pin of RASPBERRY-PI as output.

For x in range(0,7):

        GPIO.output(7,True)

        Time.sleep(.5)

        GPIO.output(7,False)

        GPIO.output(11,True)

        Time.sleep(.5)

        GPIO.output(11, False)

        GPIO.output(13,True)

        Time.sleep(.5)

        GPIO.output(13, False)

   GPIO.cleanup()

 Go to your Branch CSE or IT | ECE | EE, EIC or EEEMECE
 Know About Popular Colleges/Universities  List of IITsList of NITs | RTU-KOTA | Manipal University-Jaipur | JECRC University | Amity University Jaipur | BIT Mesra-Jaipur | MODY UNIVERSITY | LNMIIT-Jaipur | JK Lakshmipat | Banasthali Vidyapith | POORNIMA University
 Exams:   List of Exams After Graduation | List of Engineering Entrance Examinations (UG/PG) | JEE Main | JEE Advanced | GATE | IES | ISROList of PSUs
Placements:  List of companies | Logical Reasoning Questions | Quantitative Aptitude Questions | General English Questions | Technical-MCQ and Interview Questions
 Download Previous Year Papers For:  GATE | IES | RAJASTHAN TECHNICAL UNIVERSITY (RTU-Kota)RPSC Technical Exams | ISRO
 Online Free Training:  Artificial Intelligence(AI) Machine Learning(ML)Python Programming | Internet of Things-IoT | OpenCV (Open Source Computer Vision Library) | LINUX | Big Data : Hadoop | 
 Goeduhub
About Us | Contact Us   Social::   |  | 
...