 Okay, can we start? Okay, so this this is just a you know weekend project The the one day I thought I'm gonna be with it. So It's a child pay so, you know compared with all the master talking about all the Fancy stuff OS level, you know, this is just a you know, just a fun project so Which button? Oh, yeah, so Where's the star? Okay So, you know this I think this is my third time here I noticed one thing that 80% of people here and know each other. So I'm new so I thought I'm gonna introduce myself a little bit so my name is Henry Jiang and a Tinker blogger Whatever So tinker because I you know, I make things and the most of time I break things all single electronic blogger because I I have I run a website my own website on a Raspberry Raspberry Pi so it's been three years just some hobby stuff You know like my project and things I want to write so I just write it So you can take a look on if you you have a time My background is radio electronic and and back my computer. So that was like 30 40 years ago 30 years ago so nowadays I also do software development and With all this language in that particular You know sequence I See I'm sure many people have that experience that my TV remote got Spoiled by the leaking battery. So no matter how I clean it. It doesn't work anymore, right? It is it's intermittent so the one thing I think say why don't I just build a IR remote using I can use my iPhone to control it. So And so I think about What MCU I'm gonna use so This February I happen to be in Hong Kong and then cross the border went to Huachang Bay. So I bought whole bunch of you know Mostly impulse buy. So just buy buy buy. So I bought three ESP 32 some say I'm gonna use it and then when I bargain with the guy Say, you know, I want discount He reluctant to give me so he give me eventually give me a s HST 21 the temperature sensor So I'm gonna use this as well So I'm sure everybody know about ESP 32, right? So there's no need to to introduce here One thing I like is that there's a form for mega Fresh memory inside there so you can you can put in a lot of stuff there Including graphic and everything so To build our IR Controller I need the the transmitter and receiver. So I just find a Set up box whole box. I you know take take out the the Transmitter and receiver and then use that trans receiver. I do the decoding To get all the code for for my TV remote control Turn out that I my setup box using an EC standard and then the TV is across Samsung. So they use their protocol So to control a IR is very simple You just send out the modulation and then turn the LED on off. That's very simple. And then that Sensor is actually I square C. So nothing fancy. So everybody know here know how to do it But you you need a web server in order to control it to you to use it on the on the iPhone or You know control the phone. So here's my diagram. So You Use a ESP 32 to run a web server. So and then Listen to the the request Get request post request and all that. So basically there are two requests one is the the get request to get a temperature reading from from this ESP 32 and All the button you press on the iPhone is using a post request and to send it send it from the client back to the To the ESP 32 server and then the server will decode that based on the button you press Send all the control so so So this is a dress that you can you can for the for the for the web server and then with a little bit html a little bit CSS and You actually the product look like this So on the iPhone. So this is all just purely html and the CSS and Also, I can save the The web page as icon on the on the iPhone. So you later you can see See from my phone or then using the JavaScript to put up a Seller event listener. So listen to the two Request so the get temperature is Generated from the the client. So set every minute. So every one minute It will send the request to the server and then the server will send back the temperature and the humidity Every button you press is sample a post request post slash API Just for fun. So It will send back This is more for humans. So is a Understand which one What this button means the other one is the code they use that code to us the index and then to to get the IR code the You see you have a JavaScript. You have you have a CSS you have index html or the file and even the icon Graphic image. So all those file how the units stall in the MCU So turn out that ESP 32. There's the one the fresh memory using the SPI FFS It's it's look like a File system by cheese now. It's just a threat of Fouses So what happened is that you have a directory called data? Insights inside it's actually not the Directory so if you within the directory, there's an index HTML file What happened is that they actually say save the file as the data slash index html So you look to the human it looked like a Directory but actually it's not In order to to Upload this data you need a special Adrenal plug-in that provide by the ESP 32 so as long as you put in all the data You want to upload into a data file into a data directory then you can upload everything into it On the server side Basically, I already talked about is that you're basically there's three three different route. So when when the row is called for the For the roots is actually so far from the the SPI FFS as a setting content. So no need to to pass to the to the to the server Then for these two route you will have a callback function to handle that so the hardware I Have a earphone box. So I just use that earphone boss and put everything in inside So this is a whole thing And I have sorted the Transistor everything on the back of the ESP 32 So it make it very compact. I will talk about the pro and com of this It turned out have there are some problem with this and this is the final product that look like this Hey, so I make a video to just demonstrate this thing's work. So there's a standard C++ Not using rust So This is this is this is a box and it's just put there the distance wise I try to control the the the the the the million so I Keep about within the range about two two meter. That's fine. So I don't want to use over use So this thing work You get that idea so You got a time timing issue. So I just go back to the power point so So what happened to this whole thing turned out that using the triple a battery is not a good idea because the power consumption of the ESP 32 so So the triple a battery use about 24 hours then finish So I'm still trying to see that I don't really want to use a charger or something that there So I still try to think maybe as you hack The set up box and then use that USB drive and then to give me a power or something the other problem I have is that the The powers the batches the same temperature sense on top of it turn out to be the Because of the ESP 32 can be very hot sometimes like 50 degree you touch it you feel it So we heat up the box like sometimes see the temperature like a five degree higher Then at you at the actual temperature. So, you know, you learn something That doesn't that's a perfect, you know the purpose of learning So I have a more detail on the on my website and also the other source code is on the github So, thank you