![]() ![]() Blank the screen by using “show” with four blank spaces (assuming you have four digits on your screen). Be sure to put the parameter string in quotes. If you enter more than four characters, only the first four will be shown. These can be letters or numbers, but note that many letters, W for example, will look awkward. ![]() Use the “show” method to display any four characters. Create an instance of the tm1637.TM1637 object called “mydisplay” and enter the correct pin numbers for the CLK and DIO pins as parameters. We will use the utime library to put a one-second “sleep” delay between each function so you have time to watch them on the display.ĩ. Create a new MicroPython script in Thonny or the MicroPython IDE of your choice.Ĩ. Since the Pico with MicroPython doesn’t appear as a drive letter, the easiest way to do this is to open tm1637.py in Thonny or the IDE or your choice and save it from there.ħ. Copy tm1637.py to your Pico’s root directory. Download the tm1637.py file from Mike Causer’s TM1637 github project. We’re going to rely heavily on the excellent TM1637 MicroPython library from Mike Causer and create a script which shows a variety of display options, which you can use in your own projects later on.ĥ. (Image credit: Tom's Hardware) How to Code a 7-Segment Display in MicroPython
0 Comments
Leave a Reply. |