SlideShare ist ein Scribd-Unternehmen logo
1 von 8
LED PROGRAMME
import RPi.GPIO as GPIO
pinNum = 17
GPIO.setmode(GPIO.BCM)
GPIO.setup(17,GPIO.OUT)
GPIO.output(17,GPIO.HIGH)
GPIO.output(17,GPIO.LOW)
LED PROGRAMME(CONTINEOUS)
import RPi.GPIO as GPIO
import time
pinNum = 8
GPIO.setmode(GPIO.BCM)
GPIO.setup(8,GPIO.OUT)
while True:
GPIO.output(8,GPIO.HIGH)
time.sleep(0.5)
GPIO.output(8,GPIO.LOW)
time.sleep(0.5)
LED INTERFACING USING ONE
SWITCH
import RPi.GPIO as GPIO
import time
pinNum = 8
pinNum = 17
GPIO.setmode(GPIO.BCM)
GPIO.setup(8,GPIO.OUT)
GPIO.setup(17,GPIO.IN)
Input=GPIO.input(17)
while True:
if(GPIO.input(17)):
GPIO.output(8,GPIO.HIGH)
time.sleep(0.5)
GPIO.output(8,GPIO.LOW)
time.sleep(0.5)
 

Weitere ähnliche Inhalte

Was ist angesagt?

Games no Windows (FATEC 2015)
Games no Windows (FATEC 2015)Games no Windows (FATEC 2015)
Games no Windows (FATEC 2015)Fabrício Catae
 
Memory efficient pytorch
Memory efficient pytorchMemory efficient pytorch
Memory efficient pytorchHyungjoo Cho
 
Probability of finding a single qubit in a state
Probability of finding a single qubit in a stateProbability of finding a single qubit in a state
Probability of finding a single qubit in a stateVijayananda Mohire
 
Ecet 330 final exam new 2016
Ecet 330 final exam new 2016Ecet 330 final exam new 2016
Ecet 330 final exam new 2016sergejsvolkovs10
 
Write a program to perform translation
Write a program to perform translationWrite a program to perform translation
Write a program to perform translationShobhit Saxena
 
Write a program to perform translation.
 Write a program to perform translation. Write a program to perform translation.
Write a program to perform translation.Shobhit Saxena
 
LED Blinking logic on LPC1768
LED Blinking logic on LPC1768LED Blinking logic on LPC1768
LED Blinking logic on LPC1768Omkar Rane
 
Turbo C Graphics and Mouse Programming
Turbo C Graphics and Mouse ProgrammingTurbo C Graphics and Mouse Programming
Turbo C Graphics and Mouse ProgrammingHuzaifa Butt
 
Rasperry pi Part 15
Rasperry pi Part 15Rasperry pi Part 15
Rasperry pi Part 15Techvilla
 

Was ist angesagt? (18)

Games no Windows (FATEC 2015)
Games no Windows (FATEC 2015)Games no Windows (FATEC 2015)
Games no Windows (FATEC 2015)
 
ADS-B Out Experiment
ADS-B Out ExperimentADS-B Out Experiment
ADS-B Out Experiment
 
Program 8 candidate
Program 8 candidateProgram 8 candidate
Program 8 candidate
 
Memory efficient pytorch
Memory efficient pytorchMemory efficient pytorch
Memory efficient pytorch
 
Prepostinfix
PrepostinfixPrepostinfix
Prepostinfix
 
Practical no 2
Practical no 2Practical no 2
Practical no 2
 
Probability of finding a single qubit in a state
Probability of finding a single qubit in a stateProbability of finding a single qubit in a state
Probability of finding a single qubit in a state
 
Ecet 330 final exam new 2016
Ecet 330 final exam new 2016Ecet 330 final exam new 2016
Ecet 330 final exam new 2016
 
1 c introduction
1 c introduction1 c introduction
1 c introduction
 
Virtual inheritance
Virtual inheritanceVirtual inheritance
Virtual inheritance
 
Write a program to perform translation
Write a program to perform translationWrite a program to perform translation
Write a program to perform translation
 
Goal state
Goal stateGoal state
Goal state
 
C coroutine
C coroutineC coroutine
C coroutine
 
Write a program to perform translation.
 Write a program to perform translation. Write a program to perform translation.
Write a program to perform translation.
 
LED Blinking logic on LPC1768
LED Blinking logic on LPC1768LED Blinking logic on LPC1768
LED Blinking logic on LPC1768
 
Turbo C Graphics and Mouse Programming
Turbo C Graphics and Mouse ProgrammingTurbo C Graphics and Mouse Programming
Turbo C Graphics and Mouse Programming
 
MFC Cosinus
MFC CosinusMFC Cosinus
MFC Cosinus
 
Rasperry pi Part 15
Rasperry pi Part 15Rasperry pi Part 15
Rasperry pi Part 15
 

Mehr von Maryala Srinivas

Drones / UAV workshop part - 1
Drones / UAV workshop part - 1Drones / UAV workshop part - 1
Drones / UAV workshop part - 1Maryala Srinivas
 
Drones / UAV workshop part - 2
Drones / UAV workshop part - 2Drones / UAV workshop part - 2
Drones / UAV workshop part - 2Maryala Srinivas
 
Are you an engineer or imagineer
Are you an engineer or imagineerAre you an engineer or imagineer
Are you an engineer or imagineerMaryala Srinivas
 
Spread your wings, Become an Entrepreneur
Spread your wings, Become an EntrepreneurSpread your wings, Become an Entrepreneur
Spread your wings, Become an EntrepreneurMaryala Srinivas
 
Guidelines for academic project work
Guidelines for academic project workGuidelines for academic project work
Guidelines for academic project workMaryala Srinivas
 
IEEE 2015 Projects for M.Tech & B.Tech VLSI
IEEE 2015 Projects for M.Tech & B.Tech VLSIIEEE 2015 Projects for M.Tech & B.Tech VLSI
IEEE 2015 Projects for M.Tech & B.Tech VLSIMaryala Srinivas
 
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...Maryala Srinivas
 
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...Maryala Srinivas
 

Mehr von Maryala Srinivas (14)

Africa PPT by Honey Siri
Africa PPT by Honey SiriAfrica PPT by Honey Siri
Africa PPT by Honey Siri
 
Drones / UAV workshop part - 1
Drones / UAV workshop part - 1Drones / UAV workshop part - 1
Drones / UAV workshop part - 1
 
Drones / UAV workshop part - 2
Drones / UAV workshop part - 2Drones / UAV workshop part - 2
Drones / UAV workshop part - 2
 
Are you an engineer or imagineer
Are you an engineer or imagineerAre you an engineer or imagineer
Are you an engineer or imagineer
 
Spread your wings, Become an Entrepreneur
Spread your wings, Become an EntrepreneurSpread your wings, Become an Entrepreneur
Spread your wings, Become an Entrepreneur
 
Guidelines for academic project work
Guidelines for academic project workGuidelines for academic project work
Guidelines for academic project work
 
IEEE 2015 Projects for M.Tech & B.Tech VLSI
IEEE 2015 Projects for M.Tech & B.Tech VLSIIEEE 2015 Projects for M.Tech & B.Tech VLSI
IEEE 2015 Projects for M.Tech & B.Tech VLSI
 
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...
 
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...
IEEE 2015 Projects for M.Tech & B.Tech Embedded Systems, VLSI, Communication,...
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Basics of Raspberry Pi
Basics of Raspberry PiBasics of Raspberry Pi
Basics of Raspberry Pi
 
Communication skills
Communication skillsCommunication skills
Communication skills
 
P so c
P so cP so c
P so c
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 

Kürzlich hochgeladen

Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfAdmir Softic
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876dlhescort
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...daisycvs
 
Business Model Canvas (BMC)- A new venture concept
Business Model Canvas (BMC)-  A new venture conceptBusiness Model Canvas (BMC)-  A new venture concept
Business Model Canvas (BMC)- A new venture conceptP&CO
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...amitlee9823
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Sheetaleventcompany
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxpriyanshujha201
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfAmzadHosen3
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...lizamodels9
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...Aggregage
 

Kürzlich hochgeladen (20)

Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
Quick Doctor In Kuwait +2773`7758`557 Kuwait Doha Qatar Dubai Abu Dhabi Sharj...
 
Business Model Canvas (BMC)- A new venture concept
Business Model Canvas (BMC)-  A new venture conceptBusiness Model Canvas (BMC)-  A new venture concept
Business Model Canvas (BMC)- A new venture concept
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdf
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
Russian Call Girls In Gurgaon ❤️8448577510 ⊹Best Escorts Service In 24/7 Delh...
 
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
The Path to Product Excellence: Avoiding Common Pitfalls and Enhancing Commun...
 

Led with raspberry pi

  • 1.
  • 2.
  • 3.
  • 4.
  • 5. LED PROGRAMME import RPi.GPIO as GPIO pinNum = 17 GPIO.setmode(GPIO.BCM) GPIO.setup(17,GPIO.OUT) GPIO.output(17,GPIO.HIGH) GPIO.output(17,GPIO.LOW)
  • 6. LED PROGRAMME(CONTINEOUS) import RPi.GPIO as GPIO import time pinNum = 8 GPIO.setmode(GPIO.BCM) GPIO.setup(8,GPIO.OUT) while True: GPIO.output(8,GPIO.HIGH) time.sleep(0.5) GPIO.output(8,GPIO.LOW) time.sleep(0.5)
  • 8. import RPi.GPIO as GPIO import time pinNum = 8 pinNum = 17 GPIO.setmode(GPIO.BCM) GPIO.setup(8,GPIO.OUT) GPIO.setup(17,GPIO.IN) Input=GPIO.input(17) while True: if(GPIO.input(17)): GPIO.output(8,GPIO.HIGH) time.sleep(0.5) GPIO.output(8,GPIO.LOW) time.sleep(0.5) 