This is one of my blog post without using GenAI to help with grammar and such. I know, I did some research using tools, but writing this post, I am doing my best use my all fingers to type the words one by one.
So in this post, I will talk about ESP32. This is a tool that can be used for beginner who are interested in doing coding and robotic in a cheap way. In Indonesia it self, I bought the kit, available on an e-commerce, it was only Rp200.000 or about $20.
So in this post, I will talk about ESP32. This is a tool that can be used for beginner who are interested in doing coding and robotic in a cheap way. In Indonesia it self, I bought the kit, available on an e-commerce, it was only Rp200.000 or about $20.
To make a Smart Bin like in the picture above, we only need 3 tools, and some materials. They are:
Tools we need:
- ESP32 as the main character, as the brain of the computer
- Servo SG90, as the motor that will move the bin lead to up and down
- HC-SRO4 as the movement sensor, look like eyes, but they are distance sensor, will make it read if <20cm, the lid opens.
ESP32
| Servo S90 |
Materials we need:
- A coffee cup
- Tape
- Some cable jumper (you'll get it in the package if you buy the kit)
- USB Cable for uploading the code and also as it's power source
| Cable Jumper |
| Coffee Cup |
How to make it?
- Let's assemble the ESP32 and its extension.
- Plug in the USB cable and make sure both the ESP32 and its extention has red light on.
- Connect the Servo to ESP32 using cable jumper with this adjusment:
- Servo has 3 connectors, all connect to D26.
- Brown to G
- Red to V
- Yellow to S
- Connect HC-SRO4 to ESP32 with this adjustment:
- VCC to 5V (Oh I forgot, there is yellow jumper on ESP32, move it to 5V instead of 3V)
- Trig to D5 (choose the S)
- Echo to D (choose the S)
- Gnd to Gnd
Time to code!
No worries, I know sometimes coding is boring, thus I asked some help from the most reliable helper, GenAI. So honestly I copied pasted the code to Arduino IDE. Ok, I'll tell you the step in coding part.
- Install Arduino IDE.
- Install some necessary libraries for supporting our tools (HC-SRO4, Servo, ESP32).
- After three of them installed, you can copy paste this code to the coding space.
- Click the check mark button on top of the code spase to check whether there's missing or error code.
- Then if all is ok, click the sign right button to upload the code to our ESP32 hardware.
- If all is good, you're Smart bin is function.
Comments
Post a Comment