LCD with ESP32 on Arduino IDE

For this Embedded System assignment, my team and I purchased an LCD with I2C communication and installed a library. We wanted to display a static test on the LCD.

We followed this tutorial. Sadly, connecting the LCD to ESP32 needed four female to female jumper wires while we only had three. So, instead of directly connecting the two device, we connected the I2C to the arduino breadboard and wired it to the ESP32 using male to female jumper wire. We connected the ESP32 to our laptop using USB cable.

We could see the LED on ESP32 and the LCD lit up. We thought the circuit had connected to the laptop just fine. We compiled and uploaded the code in the IDE to search for I2C address. We failed for the first time because apparently we had used the schematic diagram of the wiring for ESP8266. Our circuit was not detected by the IDE.

Wrong circuit arrangement
Correct circuit arrangement

After following the right diagram for ESP32, we found the address which was 0x27, same as the address listed on the tutorial.

Next, we compiled and uploaded the code for displaying a static test. We observed there was nothing on the LCD even though there was no problem with the code. Using a screwdriver, we adjusted the potentiometer on the I2C. The backlight was fixed so that our static test could be displayed clearly.

For this assignment, we got many experiences because the challenges we faced. Thankfully, we were able to overcome all of them.


ESP32 is a multipurpose system on a chip. My team built a touch sensor and a magnet sensor for our Embedded System class weekly assignment.

To program our ESP32, we used Arduino IDE. So first thing first, we have to install ESP32 add-ons successfully.

How to Make A Touch Sensor

The board pinout of ESP32 has ten different touch sensors. They are the pink buttons in the following diagrams. Each of them corresponds to one GPIO. Those GPIOs can detect variations in anything that has an electrical charge, including human skin.


We used the code provided by this source.

We connected a jumper wire to GPIO 4. Then, we connected the ESP32 to our laptop using a USB cable. Next, we uploaded the code after making sure we have selected the right board and COM port.

In the Arduino window, we opened Serial Plotter. When we touched the metal part of the jumper wire, the values displayed in Serial Plotter changed. We noticed that when the wire wasn’t touched, the values displayed would be around 70, and around 10 when it was touched.

We integrated an LED light to our circuit. This is the code we used.

We determined the threshold to be 20 since we already knew the range of values from the previous tries.

With this new circuit, our LED would light up every time the wire was touched.

How to Make A Magnet Sensor

Turns out ESP32 already has a built-in hall effect sensor. It can detect a change in the magnetic field surrounding it.

Here is the code for our magnet sensor.

We connected the ESP32 to our laptop using a USB cable. Then, we uploaded the code after making sure we have selected the right board and COM port.

Through the Serial Monitor we opened in the Arduino window, we figured out that when the magnet was far away from the sensor, the values displayed was around 20. When the magnet was attached to the sensor, the values changed to around 50. We have known from the reference that attaching different magnetic poles to the sensor would result in a negative value. Sadly, our magnet was one-sided. Next time, we are going to try using another magnet with both poles exposed.

We decided to code for the integration of LED light to our circuit. We determined a certain value for the threshold. Here is our code.


After creating a proper circuit and uploading the code, we could observe the LED lit up when our magnet was close to the sensor.

That was how we made a very simple touch and magnet sensor using ESP32. There are tons of tutorials on the internet that has helped us tremendously. We are looking forward to creating more projects using ESP32 and explore the world of Embedded System.

Dear Plaza Widya, Menemukan Jawaban Ternyata Tidak Mudah

Sebagai seorang mahasiswa tingkat dua, aku menemukan banyak sekali pertama kali sepanjang semester tiga bergulir kemarin. Pertama kali jadi bagian dari himpunan, pertama kali punya adik tingkat, pertama kali masuk jurusan… dan banyak lagi pertama kali lainnya. Aku juga sudah terbiasa untuk menjalani kelas-kelas sebatas di satu gedung saja, gedung Labtek V. Tapi nggak apa-apa, aku senang. Labtek V adalah salah satu dari empat labtek yang menyusun arguably tempat paling iconic di ITB. Empat labtek dengan bangunan identik hingga dijuluki labtek kembar yang mengapit suatu spot foto legendaris di ITB, Plaza Widya Nusantara.

Continue Reading

defeating our(arrogant)selves

I feel like the most archaic form of evil feelings human has is arrogance. Its existence can be traced back to the time when humans hadn’t even set their foot on the earth yet. It’s a feeling so primal and so old but also so familiar because we still breathe it in and out, in and out.

Arrogance is not our neighbor nor our acquaintance. It’s inside us. It resides there on the deepest pit of your, and my, heart. To be fair, even though I said ‘deepest’, most of the time it’s not important. As long as we still live with a constantly overflowing arrogance, not even burying the feeling underground could prevent that rotten thing from spilling out to the outside world.

Continue Reading

OSN: Antara Urgensi, Ambisi, dan Arogansi

Assalamu’alaikum wa rohmatullaahi wa barokaatuh.

Kilas balik tahun 2018. Pertengahan tahun 2018 adalah bulan-bulan paling tidak produktif yang pernah aku lalui. Aku merasa, aku yang ketika itu telah terpisah jarak oleh teman-teman SMA-ku gagal menjadi support system bagi sebagian dari mereka yang masih berjuang menghadapi tes demi tes masuk universitas. I simply didn’t bother to call or check up on them. Setelah setahun berlalu dan aku mendengar sendiri kisah perjuangan teman-temanku saat itu, I feel like I failed to be their friends. Aku juga sama sekali nggak peduli dengan jalannya OSN. Setelah 3 tahun berturut-turut menjadi peserta (2014, 2015, 2016) dan 2017 mengamati jalannya kompetisi dari dekat karena sedang persiapan IBO ke Inggris, 2018 sangat… Berbeda. Aku sudah pulang ke kampung halaman, aku bahkan nggak yakin bahwa aku masih sesuka itu dengan Biologi setelah setahun tidak berkompetisi, dan aku… Sengaja menghindar, mungkin? Entahlah.

Continue Reading

Let’s talk about our feelings

Yes, let’s talk about our feelings, shall we?

Human mind and emotion is very interesting. And I just found out that people can invest almost all of their happiness to a single thing or person.

Honestly … It is such a new concept for me. All this long, I feel like I have tons of reasons to be happy, as much as I have tons of other reasons that make me sad. For me, human emotion is affected by countless variables in life, so the idea of our life being crushed down just because of one particular reason baffles me.

For example, I might be sad if I score badly in tests, heck I might even cry myself to sleep because of it. But even then, I’ll smile again after some time, maybe after a talk with my parents, maybe after joking around with my friends, or simply after browsing cute kitten videos on the internet (you should definitely try this!).

Continue Reading

My Devil and I

Assalamu’alaikum teman-teman semua ๐Ÿ™‚

Rasanya aneh … membuka wordpress dan dihadapkan interface penulisan blog post baru seperti ini. Hehe. Betapa lamanya blog ini membeku, post terakhirku lebih dari setahun yang lalu. Aku bahkan sampai kagok merangkai kata-kata ๐Ÿ˜€ . Tapi … kali ini aku merasa harus. Harus menyatakan sesuatu yang sudah cukup lama menumpuk di hatiku. Sesuatu yang sudah kusimpan sejak dulu, tapi karena beberapa kejadian belakangan, aku memantapkan hati untuk membagi tulisan ini kepada teman-teman semua, dan seluruh dunia.

Rupanya, ada beberapa hal yang baru aku rasakan dan pahami setelah lulus dari SMA.ย Boleh kubilang, aku menuliskan ini dengan hati berdebar-debar. Aku benar-benar akan mengungkapkan sesuatu yang sudah bersinggah lama di benakku. In a way, I’m going to expose my own fragility and deepest and darkest thoughts. This… is not easy at all. Tapi aku tetap berusaha lanjut menulis karena aku percaya, tulisan ini bisa menjadi titik awal untuk pembahasan yang lebih dalam mengenai permasalahan yang akan aku uraikan, untuk kemudian menjadi bahan introspeksi diri kita masing-masing ๐Ÿ™‚

Selamat membaca!

Continue Reading