Member-only story

How to use Micropython on a CYD (Cheap Yellow Display)

Keir Finlow-Bates
6 min readMar 19, 2024

A while back I stumbled across Witnessmenow’s Cheap Yellow Display repository, and thought that it looked interesting (and cheap at $15 or so per device).

Unfortunately it didn’t cover using Micropython on the device, and I hate using C++, so I ended up with two of them sitting on my desk doing nothing.

Today I finally found a repository providing the code to get Micropython working on a CYD, but the instructions were rather brief, so I though I’d document how I got it to work for anyone else in the same position as me.

This guide walks you through getting everything set up and working, assuming you are using Ubuntu 22.04. If you’re using MacOS or Windows, it should help, but you’ll have to dig out the platform specific steps by searching the web yourself.

So, let’s get started.

Set up your environment

We want to use a virtual environment so we don’t mess up our Python installation on our machine.

mkdir CYD-micropython
cd CYD-micropython
mkdir venv
python -m venv ./venv
source venv/bin/activate

Then we install the esptool for flashing files to the CYD, and thonnyfor uploading files after we’ve flashed the CYD with Micropython.

pip install esptool
sudo apt-get install thonny

Obtaining the Python driver files

Clone JettisOnTheNet’s example and drivers for Micropython on the CYD:

git clone https://github.com/JettIsOnTheNet/Micropython-Examples-for-ESP32-Cheap-Yellow-Display

Gathering port information

You will need to connect your CYD to your PC using a USB-micro cable (but don’t do it quite yet). Note that the USB cable has to be a data carrying cable — many of these cables are for power only. If the next steps don’t work, your first step should be to try a new cable.

Get a list of current terminal ports:

ls /dev/tty*

Then plug the board in, and run the above command again. A new port will appear in the list of ports shown. It is probably /dev/ttyUSB0. That’s your board port.

Keir Finlow-Bates
Keir Finlow-Bates

Written by Keir Finlow-Bates

I walk through the woods talking about blockchain

Responses (1)

Write a response

Thanks for your helpful post! Some notes that might help others:
- Upload in Thonny: Just right-click the file and hit Upload to/ - easier way :)
- On Ubuntu 22.04, the /dev/ttyUSB0 would not show up. The syslog showed some braille interference…

50