the-raspberry-pi-guy / lcd

This repository contains all of the code for interfacing with a 16x2 Character I2C LCD Display. This accompanies my YouTube tutorial here: https://www.youtube.com/watch?v=fR5XhHYzUK0
184 stars 107 forks source link

LCD 16x2 Simulator #78 #78

Open Jumitti opened 3 months ago

Jumitti commented 3 months ago

Describe the issue I often code away from home and I don't necessarily have an LCD screen with me... So I created a 16x2 LCD screen simulator using Tkinter, allowing for easy testing and visualization of LCD displays without physical hardware. This simulator helps in developing and debugging LCD-based projects directly from a computer. Especially if you don't have your Raspberry and LCD with you.

All you have to do is replace Lcd() and CustomCharacters() with LcdSimulator() and CustomCharactersSimulator(). I've recoded all the (hopefully) useful functions for simulation purposes and kept their names.

I've modified __init__.py to also load drivers/simulator.py which contains everything needed for the emulator.

import drivers

display = drivers.LcdSimulator()
cc = drivers.CustomCharactersSimulator(display)

# Then the rest of your finest feats

Demo

cgomesu commented 3 months ago

thanks, @Jumitti . please go ahead and submit a PR to include your demo. in addition to the source code, edit the README.md to document the details as well, per the other examples, and add a mention to this issue (#78) to automatically close it after the PR gets reviewed and approved.