There's more...

The line drawing and rectangle drawing methods can be combined in many different ways to create all sorts of shapes and drawings. The following photograph shows what the display will look like once you run the main.py script in this recipe:

In the next recipe, we will learn how to draw text on the display. It is very useful to combine box and line drawings and then render text on different parts of the display.

Get MicroPython Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.