×

Team MAST's video: Python code for Raspberry Pi 3 to glow LED on detecting obstacle Team MAST

@Python code for Raspberry Pi 3 to glow LED on detecting obstacle | Team MAST
In video I show how to connect an LED with Raspberry Pi 3, also I explain the python code to perform task after an obstacle is detected by the IR obstacle sensor which too is connected to Raspberry Pi 3. This video is basically the continuation of my previous video (in which I explained you how to connect IR obstacle sensor with Raspberry Pi). Here in this video I first explain you how to connect an LED with Raspberry Pi 3 i.e which wire of an LED is to be connected to which pin of Raspberry Pi. After we are done with the connection, I explain you simple python code line-wise which would perform some tasks (would print "Obstacle detected..!!" on console and would glow the LED) whenever an obstacle is detected. The python code which I wrote is as follows ------------------------------------------------------------------------ import RPi.GPIO as IO IO.setwarnings(False) IO.setmode(IO.BOARD) IO.setup(8, IO.IN) IO.setup(3, IO.OUT) while 1: if(IO.input(8) == False): print("Obstacle detected !!") IO.output(3, True) else: IO.output(3, False) --------------------------------------------------------------------------- Note - Before just using the above code, make sure to establish the connections in the same way as I did, i.e to which pins of Raspberry Pi did I connect IR obstacle sensor and LED and so forth. Go through my previous video first in which I explained you how to connect IR sensor to Raspberry Pi 3 : https://youtu.be/MP6TQvWBX9U If you had any of these queries raspberry pi 3 python programming tutorial Connecting LED with Raspberry Pi 3 B raspberry pi 3 python projects raspberry pi 3 python programming raspberry pi 3 python coding raspberry pi 3 python gpio tutorial How to Write and Run a Python Program on the Raspberry Pi Start programming on Raspberry Pi with Python Programming GPIO example Getting Started with the Raspberry Pi raspberry pi python gpio raspberry pi coding for beginners Building an Obstacle Avoiding Bot Using Raspberry PI How to Make an Obstacle-Avoiding Robot With Raspberry Pi Detecting obstacle with IR (Infrared) Sensor Raspberry Pi 3 Boom you have landed to the perfect place, as this video will guide you in the best way possible. In case you have any queries or concerns you can get back to me via the comment section below. Make sure to subscribe our channel Team MAST to never miss our new upload : https://www.youtube.com/TeamMAST

54

9
Team MAST
Subscribers
27.1K
Total Post
123
Total Views
396.1K
Avg. Views
7.9K
View Profile
This video was published on 2019-03-18 13:57:44 GMT by @Team-MAST on Youtube. Team MAST has total 27.1K subscribers on Youtube and has a total of 123 video.This video has received 54 Likes which are lower than the average likes that Team MAST gets . @Team-MAST receives an average views of 7.9K per video on Youtube.This video has received 9 comments which are higher than the average comments that Team MAST gets . Overall the views for this video was lower than the average for the profile.Team MAST #RaspberryPi3 #PythonCode #LED #IRSensor #ObstacleSensor has been used frequently in this Post.

Other post by @Team MAST