Cara Mudah Program LCD I2C Dengan NodeMCU ESP8266

Cara Program untuk menampilkan Teks ke display LCD yang sudah menggunakan I2C dan Cara Scan I2C untuk mengetahui alamatnya, sangat mudah sekali. Silahkan ikuti panduan berikut ini:

Komponen

  • Modul Trainer IOT
  • Board NodeMCU ESP8266
  • Display LCD 16×2
  • Modul I2C
  • Kabel Jumper (Male – Female, Female – Female)
  • Kabel USB
  • Arduino IDE

Diagram Wiring

Keterangan :

LCD 16×2 I2CModul TrainerNode MCU
GNDGND
VCCVCC
SDASDAD2 (GPIO4)
SCLSCLD1 (GPIO5)

Implementasi

  • Install Board ESP8266
    1. Buka File > Preferences di Arduino IDE.
    2. Tambahkan URL: http://arduino.esp8266.com/stable/package_esp8266com_index.json di Additional Boards Manager URLs.
    3. Pilih Tools > Board > Board Manager.
    4. Masukkan “esp8266” pada kolom pencarian, akan muncul pilihan board esp8266 by ESP8266 Community, untuk versi Board pilih 2.5.2, kemudian klik Install.
    5. Jika Instalasi benar, akan muncul board Esp8266.
    6. Pada menu pemilihan board Pilih board NodeMCU 1.0 (ESP-12E Module).
  • Install Library LiquidCrystal_I2C
    • Silahkan download terlebih dahulu Library LCD I2C, melalui link berikut: https://github.com/johnrickman/LiquidCrystal_I2C/archive/refs/heads/master.zip.
    • Setelah di download, file .zip library tidak perlu di ekstrak ya. Tinggal ikuti langkah berikut :
      1. Pada Arduino IDE, klik Menu Sketch -> Include Library -> Add .ZIP Library…
      2. Cari file Library yang sudah di Download sebelumnya, lalu pilih dan klik Open.

Kode Program

Langkah-langkah di Arduino IDE

  • Memverifikasi Kode
    • Klik tombol Verify untuk memeriksa kesalahan pada kode.
  • Upload Program
    • Hubungkan ESP8266 ke komputer.
    • Pilih board ESP8266, pastikan board yang dipilih NodeMCU 1.0 ESP-12E, uploud speed adalah 921600, dan Port telah sesuai.
    • Klik tombol Upload untuk mengunggah program.

Hasil Akhir

Jika berhasil maka akan tampil seperti gambar dibawah ini:

Video Tutorial

FAQ

Apa itu I2C dan mengapa digunakan untuk LCD?

I2C (Inter-Integrated Circuit) adalah protokol komunikasi yang memungkinkan beberapa perangkat terhubung hanya dengan dua kabel: SDA (data) dan SCL (clock). Ini memudahkan koneksi LCD dengan hanya menggunakan sedikit pin pada NodeMCU, dibandingkan dengan metode paralel yang memerlukan lebih banyak pin.

Library apa yang harus diinstal di Arduino IDE untuk mengontrol LCD I2C?

Anda perlu menginstal pustaka LiquidCrystal_I2C. Library ini memungkinkan NodeMCU berkomunikasi dengan modul LCD I2C. Anda bisa menemukannya melalui Library Manager di Arduino IDE.

Bagaimana cara menemukan alamat I2C LCD saya?

Anda dapat menggunakan program sederhana untuk mendeteksi alamat I2C. Program ini dapat dijalankan di Arduino IDE menggunakan kode I2C Scanner. Biasanya, alamat yang sering muncul adalah 0x27 atau 0x3F.

Mengapa Teks tidak kunjung muncul di layar LCD?
  • Coba ambil obeng kecil kemudian dibelakang LCD ada Trimpot warna biru, silakan di putar-putar saja.
  • Pastikan kalian sudah scan I2C dan Alamat I2C Sesuai.
  • Pastikan wiring sudah benar.
  • Periksa komponen apabila ada cacat.
Apakah proyek ini cocok untuk pemula?

Ya, menggunakan DHT11 dengan ESP8266 adalah proyek yang cocok untuk pemula yang ingin mempelajari dasar-dasar mikrokontroler, sensor, dan integrasi jaringan IoT.

Kesimpulan

Setelah mengikuti tutorial ini, kamu berhasil menampilkan teks ke LCD 16×2 I2C dan ESP8266! Seru, kan? Project ini nggak cuma mengajarkan hal baru, tapi juga membuka banyak peluang untuk bereksperimen lebih lanjut di dunia mikrokontroler. Siapa tahu, project kecil ini bisa jadi awal dari ide-ide kreatif kamu lainnya!

41 Comments.

  1. Sweet blog! I found it while searching on Yahoo News.
    Do you have any suggestions on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Cheers

  2. Thank you, I’ve recently been searching for info approximately
    this topic for a long time and yours is the greatest I have discovered till now.
    However, what concerning the conclusion? Are you certain about
    the supply?

  3. Asking questions are genuinely good thing if you are not understanding anything totally, except this
    paragraph offers pleasant understanding yet.

  4. When I originally commented I clicked the “Notify me when new comments are added”
    checkbox and now each time a comment is added I get several e-mails with the same comment.
    Is there any way you can remove people from that service?
    Thanks!

  5. Hola! I’ve been following your blog for some time now and
    finally got the courage to go ahead and give you a shout out
    from Porter Tx! Just wanted to tell you
    keep up the excellent job!

  6. A motivating discussion is definitely worth comment. I think that you should publish more on this subject
    matter, it may not be a taboo matter but generally
    people do not discuss such issues. To the next! Best wishes!!

  7. Very great post. I just stumbled upon your blog and wanted to mention that I’ve really loved surfing around your weblog
    posts. In any case I will be subscribing on your rss feed and I am hoping you write once more very soon!

  8. Thanks for the marvelous posting! I seriously enjoyed reading it, you can be a great author.I will be sure
    to bookmark your blog and will eventually come back sometime soon. I want to encourage yourself
    to continue your great job, have a nice evening!

  9. взломанные игры на андроид — это удивительная возможность получить новые возможности.
    Особенно если вы играете на Android, модификации открывают
    перед вами широкие горизонты.
    Я часто использую игры с обходом системы защиты,
    чтобы развиваться быстрее.

    Модификации игр дают невероятную свободу
    в игре, что делает процесс гораздо
    захватывающее. Играя с твиками, я могу персонализировать свой опыт, что
    добавляет виртуальные путешествия и делает игру более непредсказуемой.

    Это действительно удивительно, как такие модификации могут улучшить взаимодействие с игрой, а
    при этом с максимальной безопасностью использовать такие взломанные
    версии можно без особых проблем,
    если быть внимательным и следить за обновлениями.
    Это делает каждый игровой процесс
    уникальным, а возможности практически бесконечные.

    Рекомендую попробовать такие игры с
    модами для Android — это может открыть новые горизонты

  10. What’s up it’s me, I am also visiting this site daily, this web site is genuinely good and the
    people are actually sharing good thoughts.

  11. Thank you for the good writeup. It in fact was a amusement account it.
    Look advanced to more added agreeable from you! However,
    how can we communicate?

  12. Hello There. I discovered your weblog the use of msn. That is an extremely well written article.
    I will make sure to bookmark it and return to read moree of yoyr useful info.
    Thank you for the post. I’ll certainly comeback.

  13. Excellent beat ! I would like to apprentice while you amend your website,
    how could i subscribe for a blog site? The account helped me a acceptable deal.
    I had been tiny bit acquainted of this your broadcast provided bright clear idea

  14. wonderful issues altogether, you just received a emblem new reader.

    What may you suggest about your post that you just made a few days ago?
    Any positive?

  15. What i do not understood is in reality how you’re no longer really much more well-preferred than you may be right now.
    You are very intelligent. You already know thus considerably with regards to this
    topic, produced me for my part believe it from
    numerous varied angles. Its like men and women are not involved until it’s one thing to do with Lady
    gaga! Your individual stuffs great. Always care for it up!

  16. An intriguing discussion is worth comment. I think that you ought to write more on this topic, it might not be a taboo matter but
    typically people do not talk about these topics.

    To the next! Best wishes!!

  17. First of all I would like to say wonderful blog! I had a quick question that I’d like to ask if
    you don’t mind. I was curious to find out how you center yourself and clear
    your head before writing. I have had a difficult
    time clearing my thoughts in getting my ideas out there.
    I truly do enjoy writing however it just seems like the first
    10 to 15 minutes are generally wasted simply just
    trying to figure out how to begin. Any recommendations or tips?
    Thanks!

  18. You really make it seem so easy with your presentation but I find
    this matter to be really something that I think I
    would never understand. It seems too complicated and extremely broad for me.
    I’m looking forward for your next post, I’ll try to get the hang of it!

  19. When someone writes an article he/she keeps the
    thought of a user in his/her brain that how a user can know it.
    So that’s why this paragraph is great. Thanks!

  20. Today, I went to the beach front with my children. I found a sea shell and gave it to my 4
    year old daughter and said “You can hear the ocean if you put this to your ear.” She put the
    shell to her ear and screamed. There was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is completely
    off topic but I had to tell someone!

  21. You are so cool! I don’t suppose I’ve truly read something like this before.
    So wonderful to find another person with a few original thoughts on this topic.
    Really.. thanks for starting this up. This website is one thing that is required
    on the internet, someone with a little originality!

Leave a Reply

Your email address will not be published. Required fields are marked *