in this video we are controlling the brightness of three single LED um in two ways okay we're going to be using analog right function okay it's the first option for us okay for today's um video and uh the second option is you you um is uh using ledc right uh function okay me again uh get for yourself the uh ESP 3 2 microcontroller this guy right here breadboard we put that uh the microcontroller on the breadboard that then we WB this um two 0 0 Ohm resistor 200 R 200 Ohm resistor fine done then we
connect this leg of the resistor to the uh one of the uh um outer pin of the uh 10K um potentiometer this is a 10K um potentiometer okay guys um then I I'm going to connect okay the cathod okay the led to the uh to the free leg pin of the resistor okay the cathode just like that okay and the anode uh will be free okay right now I'm connecting this jumper wire okay one of each um side sides to anode and uh the other side to gpio 4 D4 gp4 okay great now um the
uh the resistor okay I attach here this jumper wire and it's will go to ground okay so one of the legs of this resistor which is attached to to one of the outer pin of the of the 10K on PO okay are are going to round okay as as you can see ground here now this wire is a okay I'm attaching it to the middle in of the port to GP 15 the middle pin to gpio 15 now this one is going to from this side of the potenti from this side to uh to 3.3
volt good everything is good right now okay so just like that I'm going to put behind the led the green wire okay uh I think everything is good now I can connect my cable I'm so sorry so this wire is going to GP 15 not gp2 okay guys just like that then this is the uh the diagram so we have two ways okay two codes uh today okay to for controlling the uh the brightness of this led okay uh in this code okay I'm using the um uh the uh analog right okay a very simple
uh program okay and uh I'm going to put the code in the description of this video so in this code okay so we we we can control okay um we're going to be controlling the brightness okay of these uh uh LED in two ways okay the the the the first one is using the analog right function okay from and uh the code is well explained and okay I don't I don't need to to to say anything okay I think okay because the code is commented so okay as you can see every single line okay I
explain it okay guys the great so the delay is here now you go to to to upload your code you need to go to tools uh board ESV 32 ESP 32 Dev module for me the port con s then I upload the Cod so the board I'm using I don't need to press the boot Button uh in order to upload that code okay guys because I think the uh this board is a new version while my the old the uh oldest version you you need to upload to press the boot uh uh button okay now
uh this is the controlling if you want of the uh LED uh the bright it brightness uh using analog right function okay cool H so now the second option is using the uh the function um LED Okay C right okay and uh this is the sketch for the uh for the second option okay and uh it's it's also well commended okay so I add I don't need I think to explain uh nothing here but uh if you have if you have uh any doubt you you can leave a comment okay so this is the second
option we are using the function LED C right function right function okay I second option and we we can see the value on seral so I'm going to upload uh this code from arduin web editor why because this code okay when I'm using ledc right function on adwi ID so so software okay uh the the code one upload okay uh will not uh uh uh upload and uh I don't know why but uh when I I upload it online okay using Alin web editor the code uploads very well we without any issue um so I
don't know why so that's why I'm using the uh I'm uh uploading uh uploading uh the code online okay using Adin web editor so this is the board the port seven always like uh um on uh on uh AR ID now we can upload the sketch so it you will see that uh the code will upload okay but when I us when I'm using okay the I ID I get many erors okay um so right now the code is uploading okay without any issue on web editor online so now this is I'm controlling the brightness
of this LED okay um using ledc right function so please don't forget to subscribe and hit the Bell icon and uh welcome to T education tutorial