Hi all! As I mentioned in the previous post, this experiment will be more different than usual because this time I will try to combine 2 ingredients from what I have tried before, namely I will try to play with sensors and displays. So, in this experiment, the goal is to display the sensor readings on the display. Okay, then I'll go straight to the ingredients needed.
First, of course we need to do wiring first. Then what is the wiring like? Aren't the sensors and displays from the previous post using the same pins on the ESP32? So, let's look at the following scheme:
From the comparison of the photo above, VDD on the display (red wire) and VIN on the sensor (gray wire) are connected to the same pin, namely 3V3. However, because there is only 1 pin 3V3, the VDD on the display is connected first to VIN on the sensor then from VIN it is connected to 3V3. The same method applies to the other pins as well.
As in the previous experiment, we need to import the libraries that we want to use in this experiment and then define the display size that will be used.