Hack star
Published © MIT

ESP32 Simulator for Windows - LCD character - ESP32- 2022

Run your ESP32 Micropython code on the Wokwi Embedded systems Simulator. Tinker with the code and share your projects with all πŸ˜€ 🌟

BeginnerProtip1 hour3,848

Things used in this project

Story

Read more

Schematics

ESP32 online simulator - Character LCD project

Code

ESP32 online simulator - Character LCD project

Python
from time import sleep_ms, ticks_ms 
from machine import I2C, Pin 
from i2c_lcd import I2cLcd 

AddressOfLcd = 0x27
i2c = I2C(scl=Pin(22), sda=Pin(21), freq=400000) # connect scl to GPIO 22, sda to GPIO 21
lcd = I2cLcd(i2c, AddressOfLcd, 2, 16)

def testLcd(num):
    lcd.move_to(3,0)
    lcd.putstr('Micropython')
    lcd.move_to(0,1)
    lcd.putstr("hello " + str(num))

if __name__ == '__main__':
    for i in range(100):
        testLcd(i)
        sleep_ms(200)

Credits

Hack star

Hack star

75 projects β€’ 120 followers
an Arduino enthusiast and an electronic hobbyist

Comments