Using the Raspberry Pi Pico with an Infrared Sensor

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
the next device that we will learn to program with our pico is the infrared sensor for this we're going to need a picot on a breadboard an infrared sensor an led a resistor and some wires a look at the circuit diagram to be able to build the circuit the wire circuit is also helpful in building our circuit now we first plug in the led we connect the negative of the led to ground through a resistor and the positive to a gpio pin configured as an output then plug in the infrared sensor this has three terminals vcc ground and output signal we connect the output signal to a gpio pin configured as an input we then connect the ground pin to the ground power rail and we connect vcc or power to the side rail which is connected to the power of the raspberry pi pico we then get down to the code and first import our machine library to configure our pins we also import the time library as usual we then configure one of the pins which is for the led as an output and we configure one of the pins of the sensor as an input now in a while loop we constantly look at the input that we receive from the sensor and in case the sensor detects an obstacle we set the led to turn on otherwise we turn the led off now make sure to tune the infrared sensor to the appropriate sensitivity and have fun trying the circuit out stay tuned for more videos you
Info
Channel: YoungWonks
Views: 10,792
Rating: undefined out of 5
Keywords: raspberry pi, pico, infrared, sensor, ultrasonic, python, coding, programming, Arduino, GPIO, not, engineering, robotics, computer, science, java, STEM, online, classes, tutorial, how to, DIY
Id: zh_g6J6T_5w
Channel Id: undefined
Length: 2min 40sec (160 seconds)
Published: Tue Mar 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.