lcd display raspberry pi pico free sample
This is a new Pi Pico display from Waveshare with many more pixels. It is a 2inch LCD display module, designed for Raspberry Pi Pico, with an embedded ST7789VW driver, 65K RGB colours, 320x240 pixels and an SPI interface. A Pi Pico can be plugged into the rear of the screen for very easy connection without any soldering. It sports 4 simple button switches for user input. It is bright, colourful and easy to program. The makers supply an example program (see below), which includes the display driver, making it very easy to get started. The manufacturer"s wiki can be found at:
To control an LCD with a microcontroller as the Raspberry Pi Pico can be a quite complicated job. Well, if your display is equipped with an IC2 module and specific MicroPython libraries are available, it’s not that difficult to connect to the display to the Raspberry Pi Pico. Learn with this tutorial how to connect and to program an 1602 LCD with a Raspberry Pi Pico.
There are many types of LCD displays. In this tutorial we are using the popular and affordable 1602 LCD. The LCD has an IC2 module soldered on it (see the pictures below). If your LCD is of the same type, but has a different size, it won’t be a problem to continue with this tutorial. You’ll just have to correct some parameters in the MicroPython script. But if it is from a different type or it has no I2C module, you better look for another tutorial.Prepare the hardware
– First you need a computer to run Thonny. In this tutorial we’ll use a Raspberry Pi 4 as our computer. And Thonny is a user-friendly Python IDE to interact with the Raspberry Pi Pico board. If you never used Thonny to program the Raspberry Pi Pico, before continuing, you better have a look at our tutorial “How to start programming the Raspberry Pi Pico“.
– You also need a Raspberry Pi Pico of course. And as we’ll connect another device to the Pico, we need pin headers soldered to the GPIO-pins of our board.
In this tutorial we are using the popular and quite basic 16×2 or 1602 LCD. It can display 16 characters per line on 2 lines. Each character is made from a matrix with 5×7 dots. It is equipped with a backlight for easy reading. Besides sending text, thanks to specific commands, we can give instructions to the display, as to switch on/off the backlight for example.
The display we use in this tutorial is equipped with a I2C-module (black part on the picture below). I2C is a communication protocol which allows an easier connection between the display and the Raspberry Pi Pico. Indeed, instead of having to wire all the pins on the top of the screen, we only have to connect the display with 4 wires to our Raspberry Pi Pico.
Each I2C device has its own I2C address. Often this address is hard-wired in the device and will vary from manufacturer to manufacturer. Have a look at our tutorial ‘Find out an I2C address with the Raspberry Pi Pico‘ to get the very basics of I2C.
If you bought one of our kits, the hexadecimal address of the LCD is ‘0x27’. And if you don’t know the address, you can find it out with the help of our tutorial ‘Find out an I2C address with the Raspberry Pi Pico‘. We will need the I2C address from the display to insert it in our MicroPython code.
To avoid extensive and complicated code writing, libraries are often used. For our LCD, we will also be using a library. We found the most appropriate library at GitHub from Tyler Peppy. And he based his work on the Python library created by Dave Hylands. As these files from this quite specific library don’t come automatically with MicroPython, we have to install them ourselves.
So, before writing the code, we’ll have to upload the files to our Raspberry Pi Pico. You can download a ZIP-folder containing the 2 files to be installed here.
Once downloaded and unzipped on our computer, we upload these files to our Raspberry Pi Pico. If you don’t know how to do that, have a look at our tutorial ‘Transfer files between computer and Raspberry Pi Pico‘. If you have multiple folders on your Raspberry Pi Pico, make sure you upload them in the same folder as the new file we will create for our main code. And don’t change the filenames of the library of course.
And before running the script, it’s important to adjust the contrast of your LCD. If the contrast isn’t adjusted well, it’s possible you don’t see appearing anything. You can adjust it by turning with a small screwdriver at the blue potentiometer at the back of your LCD (see the pictures here above). Make sure the backlight of the display is on to see the result. If the LCD’s contrast is adjusted right, you can just see the darker rectangles for the characters appear.
Besides the commands we used in the last lines of our script, there are more possibilities to communicate with the LCD. If you want to learn more about, have a look at this Github webpage.
Obliterate the contents of flash. An example of a NO_FLASH binary (UF2 loaded directly into SRAM and runs in-place there). A useful utility to drag and drop onto your Pico if the need arises.
Runs the lwip-contrib/apps/ping test app under FreeRTOS in NO_SYS=0 (i.e. full FreeRTOS integration) mode. The test app uses the lwIP \em socket API in this case.
An LED blink with the pico_bootsel_via_double_reset library linked. This enters the USB bootloader when it detects the system being reset twice in quick succession, which is useful for boards with a reset button but no BOOTSEL button.
A copy of the TinyUSB device example with the same name, but with a CMakeLists.txt which demonstrates how to add a dependency on the TinyUSB device libraries with the Raspberry Pi Pico SDK
Pimoroni has brought out two add‑ons with screens: Pico Display and Pico Explorer. A very basic set of methods is provided in the Pimoroni UF2 file.In this article, we aim to explain how the screens are controlled with these low-level instructions, and provide a library of extra routines and example code to help you produce stunning displays.
All graphical programs need the following ‘boilerplate’ code at the beginning to initialise the display and create the essential buffer. (We’re using a Pico Explorer – just change the first line for a Pico Display board.)
This creates a buffer with a 16-bit colour element for each pixel of the 240×240 pixel screen. The code invisibly stores colour values in the buffer which are then revealed with a display.update() instruction.
Draws the text on the screen from (63,25) in size 4 with text wrapping to next line at a ‘space’ if the text is longer than 200 pixels. (Complicated but very useful.)
After this instruction, which sets a rectangular area from (20,135), 200 pixels wide and 100 pixels high, only pixels drawn within the set area are put into the buffer. Drawing outside the area is ignored. So only those parts of a large circle intersecting with the clip are effective. We used this method to create the red segment.
Draws a circle, centred on (cx,cy), of outer radius rr and pixel thickness of rim. This is easy and fast but has the disadvantage that it wipes out anything inside ring.
Draw a circle centred on (cx,cy), of radius rr with a single-pixel width. Can be used to flash a ring around something already drawn on the screen. You need to import math as it uses trigonometry.
This returns a string version of int(n), right aligned in a string of max_chars length. Unfortunately, the font supplied by Pimoroni in its UF2 is not monospaced.
It’s probably not a good idea to leave your display brightly lit for hours at a time. Several people have reported the appearance of ‘burn’ on a dark background, or ‘ghost’ marks after very bright items against a dark background have been displayed for some time. We’ve seen them on our display, but no long-term harm is evident. Blanking the screen in the ‘tidy-up’ sequence at the end of your program may help.
We hope you have found this tutorial useful and that it encourages you to start sending your output to a display. This is so much more rewarding than just printing to the REPL.
Each month, HackSpace magazine brings you the best projects, tips, tricks and tutorials from the makersphere. You can get it from the Raspberry Pi Press online store or your local newsagents. As always, every issue is free to download from the HackSpace magazine website.
The snappily named Raspberry Pi Pico display 1.54-inch LCD by Spotpear ($11.89) brings in a 240×240 pixel IPS screen and ten buttons in a joypad-like arrangement. There’s four for direction, four for action, a select, and a start. At least, they’re labelled like this. You can use them for anything you like.
There are also some sample UF2 files included along with the C example code, but these appear to have been built for different hardware and work either partially or not at all. The actual example code did compile and work properly.
When we ran the example code, we were impressed with the quality of the screen. With 240×240 pixels in just 1.54 inches, there’s a high pixel density that can give crisp graphics. Obviously, high pixel densities are a double-edged sword. While they can look great, it does mean higher RAM use, more time transferring data, and more data to process.
Fortunately, Pico is well-suited to the task of driving screens. Each pixel can take 16 bits of colour data, so a full-frame buffer is just 115,200 bytes. The display data is transferred by SPI, and Pico has a maximum SPI frequency of half the clock speed. For MicroPython, that means 62.5MHz. The actual data transfer rate is a little less than this because of overhead of the protocol, but we were able to drive full-frame refreshes at over 40 fps, which is plenty for smooth animations.
Obviously, if you’re looking to do animations, sending the data is only half the story. You also need to calculate the frame before it’s displayed. If you’re using MicroPython, you are quite limited by the amount of processing you can do and still keep a high frame rate (though you could use the second core to offload some of the processing). With C, you’ve got much more scope, especially as you could potentially offload the data transfer using direct memory access (DMA).
The one disappointing thing about the screen is that there’s no control over the backlight. According to the documentation, it should be attached to pin 13, but it isn’t. You can’t turn it on or off – it’s just permanently on, and quite bright. That’s a deal-breaker for anything running off battery power, as it will suck up a lot of power. However, if you want a display permanently on, this might be perfectly acceptable.
Each month, HackSpace magazine brings you the best projects, tips, tricks and tutorials from the makersphere. You can get it from the Raspberry Pi Press online store or your local newsagents.
We"ve sourced a new LCD screen especially for our Pico Display Pack - it"s a lovely, bright 18-bit capable 240x135 pixel IPS display and fits the Pico perfectly. We"ve surrounded it with four tactile buttons so you can easily interface your Pico with your human fingers and an RGB LED that you can use as an indicator, for notifications or just for adding extra rainbows.
Pico Display lets you turn a Pico into a compact user interface device for a bigger project, capable of giving instructions, displaying readouts and even incorporating elaborate nested menus. If you"d rather use your Pico as a standalone device you could make a little rotating slideshow of images, display beautiful graphs from sensor data or build your own Tamagotchi or matchbox sized text adventure game.
The labels on the underside of Pico Display will show you which way round to plug it into your Pico - just match up the USB port with the markings on the board.
The easiest way to get started is by downloading and copying our custom MicroPython uf2 to your Pico, it includes all the libraries you"ll need to use our add-ons. The beginner friendly tutorial linked below will show you how to get to grips with pirate-brand MicroPython.
Pico Display also works very nicely with CircuitPython and Adafruit"s DisplayIO library - look for the Display Pack ST7789 example in the library bundle to get started!
Pico Display Pack communicates with the LCD display via SPI on pins LCD_CS, LCD_DC, LCD_SCLK, and LCD_MOSI. We also PWM the BL_EN pin (with gamma correction) for full, linear, backlight control. LCD_RESET is tied to the RUN pin on Pico so the LCD will be fully reset whenever Pico is.
There is also an onboard RGB LED (ideal to use an activity indicator!) which is also PWMed (with gamma correction) on pins LED_R, LED_G, and LED_B. If you want to use the LED pins for something else there are three cuttable traces on the underside of the board.
Power is supplied through 3V3 meaning that you can use Pico Display Pack both on USB power and from external supplies (from 1.8V to 5.5V) making it ideal for battery powered projects.
Raspberry Pi Pico is a flexible, low cost microcontroller development board from the folks at Raspberry Pi, based on their very own chip - the RP2040. It"s easily programmable over USB with C/C++ or MicroPython, and ideal for using in all sorts of physical computing projects, devices and inventions - we"re so excited to see what you make with it!
We"ve called our Pico-sized add-ons packs, as they"re designed to attach to the back of your Pico as if it were wearing a very stylish back pack (or a miniature jet pack, if you prefer). We"ve also got Pico bases (larger add-on boards with a space to mount your Pico on top) and some other boards that let you do interesting hackerly things like using multiple packs at once - click here to view them all!
With the included Raspberry Pi Pico C/C++ and MicroPython demos, getting started with this screen is quick and easy. There"s also no soldering required with this LCD display - just slot your Pico into the female headers on the rear and you"re good to go!
This display uses an embedded ST7735S driver, which uses the SPI bus to communicate with your Pico (leaving the majority of your Pico pins free for other things!).
The Raspberry Pi Pico is a radical change from previous Pis, because it’s not a Linux computer, but a a microcontroller board like Arduino . The biggest selling points of the Raspberry Pi Pico are the price, $4 and the RP2040 chip which provides ample power for embedded projects and enables users of any age or ability to learn coding and electronics. If you have a Windows, Apple, Linux computer or even a different Raspberry Pi, then you are already well on your way to using the Raspberry Pi Pico in your next project. Unlike most other Raspberry Pi, the Pico comes with an unsoldered header, but using one of the best soldering irons from our list will soon see your Pico ready for big projects.
In June 2022, Raspberry Pi announced its latest iteration, the Raspberry Pi Pico W. As you can probably guess, the W stand for Wi-Fi and this is provided via Infineon"s CYW43439 chip which provides 2.4 GHz Wi-Fi using an onboard antenna. For just $6, $2 more than the original Pico, we have a low cost and easy to use IoT platform.
In our review we managed to get our Pico W online in mere moments, a combination of great hardware and an easy to use MicroPython module means the Pico W will soon be powering thousands of IoT devices across the world.
The Raspberry Pi Pico is vastly different from any model before it. It is the first device to use RP2040 “Pi Silicon” which is a custom System on Chip (SoC) developed by the Raspberry Pi team which features a dual core Arm Cortex M0+ running at 133 MHz, 264KB of SRAM and 2MB of flash memory used to store files.
The one downside of the Raspberry Pi Pico is that there is no wireless connectivity. Something that has since been rectified thanks to the Raspberry Pi Pico W. The RP2040 is the first microcontroller in the Pi range and this brings with it a new way of working. The Pico is not a computer, rather we need to write code in an external application on a different computer and “flash” the code to the microcontroller over USB. In our tutorial on how to get started with Raspberry Pi Pico, we explain how to connect a PC to the Pico and use it to upload MicroPython code.
The Pico and third-party RP2040 boards can use a variety of programming languages, include MicroPython, CircuitPython, C/C++ and Arduino language. There"s even Piper Play, a block-based version of Python for the Pico.
MicroPython and C/C++ are the officially supported languages from the Pi Foundation, but CircuitPython, which is similar, has certain advantages such as its built-in support for USB HID, which means that you can turn your Pico into a keyboard, mouse or joystick that"s recognized by a PC.
With the release of the Raspberry Pi Pico W, we now see two different firmware options, one for the new Pico W 2 and the other for the original board. In the announcement blog post, Raspberry Pi LTD CEO explains why this is required.
"This UF2 firmware we’re making available for Pico W is a separate build to the existing MicroPython firmware for our original Pico board. We’ll be upstreaming the changes to the main MicroPython repository soon after launch, but as MicroPython has separate binaries on a per-board rather than per-architecture basis there will always be two distinct UF2 firmware releases going forward. One for Pico, the other for Pico W."
A fork of MicroPython, CircuitPython has been released for RP2040 boards. Created by Adafruit, CircuitPython has an impressive library of pre-written modules for sensors, LCD / OLED / LED screens and output devices such as thermal printers. Flashing CircuitPython to the Raspberry Pi Pico is as simple as flashing MicroPython, and it is reversible should you wish to revert back to MicroPython or C/C++.
Writing code in C/C++ is made possible via two methods. Firstly we can write the code directly in a text editor of our choice and then follow a workflow to build the files which are then flashed to the Pico. Or we can use a graphical workflow and have Microsoft’s Visual Studio Code handle the creation, build and flash process in one application.
You can now now use the Arduino IDE to write code for your Pico. Arduino code is loosely a version of C/C++ so this might be a simpler way to write and upload your code.
More importantly, we can also solder header pins to the Pico and use it in a breadboard. See our tutorial on how to solder Raspberry Pi Pico pins for more details.
We can use the power of Pico at the heart of robotics and motorized projects, collect data using sensors for temperature, humidity, light and pollution and we can learn the basics of programming and electronics.
The Raspberry Pi Pico is the first but not the only board to use RP2040. There are around a dozen third-party boards that have been announced and three that we know have hit the market thus far.
Our favorite third-party RP2040 board is Adafruit"s Feather RP2040, which features 16MB of storage (versus 2MB on the Pico), 4 ADC channels (versus 3 on the Pico), an RGB light, a built-in Lipo battery connector and, most importantly, the ability to connect to Adafruit"s huge ecosystem of Featherwing add-on boards.
We"ve also tested the Pimoroni Tiny RP2040, which is an extremely-small board that sports 4 ADC channels, 8MB of storage and an RGB light. SparkFun"s MicroMod RP2040 puts the SoC on a tiny M.2 board which you can plug into a variety of carrier boards with different features.
Row 0 - Cell 0Raspberry Pi Pico WRaspberry Pi PicoAdafruit Feather RP2040Adafruit ItsyBitsy RP2040Adafruit QT Py RP2040Adafruit Trinkey QT2040Arducam Pico4MLArduino Nano RP2040 ConnectCytron Maker Pi PicoCytron Maker Pi RP2040Pimoroni Keybow 2040Pimorono Pico LipoPimoroni Tiny 2040SparkFun MicroModSparkFun Pro MicroSparkFun Thing Plus
GPIO26 × multi-function GPIO pins 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 8 × Programmable I/O (PIO) state machines for custom peripheral support Castellated module allows soldering directly to carrier boards.26 × multi-function GPIO pins 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 8 × Programmable I/O (PIO) state machines for custom peripheral support Castellated module allows soldering directly to carrier boards.21 × multi-function 2 × SPI, 2 × I2C, 2 × UART, 4 × 12-bit ADC, 16 × controllable PWM channels 8 × Programmable I/O (PIO) state machines for custom peripheral support. Castellated module allows soldering directly to carrier boards.23 GPIO pins 16 x PWM outputs 10 x Digital I/O, 4 x Analog 12-bit ADC, 2 x I2C, SPI, 2 x UART, 10 x Programmable IO11 GPIO pins. 7 x Digital I/O, 4 x Analog 12-bit ADC, 2 x I2C (including Stemma QT), SPI, UART, 6 x Programmable IO.Stemma QT / Qwiic connector26 × multi-function GPIO pins 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable. 8 × Programmable I/O (PIO) state machines for custom peripheral support20× multi-function 3.3V GPIO pins 1× SPI, 1 × I2C, 1 × UART, 8 × 12-bit ADC, 20 × controllable PWM channels 8× Programmable I/O (PIO) state machines for custom peripheral support. 1x User LED (GPIO 13)26 × multi-function GPIO pins 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable. 8 × Programmable I/O (PIO) state machines for custom peripheral supportNo direct GPIO access, 7 x Grove connectors provide GPIO access 4 x Servo headers, can be used as GPIOA small selection of GPIO is broken out for use. I2C, Serial / UART. Access to these pins requires soldering.26 × multi-function GPIO pins 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable. 8 × Programmable I/O (PIO) state machines for custom peripheral support12 GPIO pins. 7 x Digital I/O, 4 x Analog 12-bit ADC, 2 x I2C, SPI, UART, Debug30 × multi-function GPIO pins 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × PWM controllable. 8 × Programmable I/O (PIO) state machines for custom peripheral support20 × multi-function GPIO pins 1 × SPI, 1 × I2C (Qwiic), 2 × UART, 4 × 12-bit ADC, 10 × PWM controllable. 8 × Programmable I/O (PIO) state machines for custom peripheral support18 × multi-function GPIO pins 2 × SPI, 2 × I2C (Qwiic), 2 × UART, 4 × 12-bit ADC, 8 × PWM controllable. 8 × Programmable I/O (PIO) state machines for custom peripheral support
Extra FeautresN/AN/A1 x WS2812B Neopixel STEMMA QT / Qwiic connector Onboard battery charging and support for hot swappable LiPo and Lilon batteries.1 x WS2812B NeoPixel1 x WS2812B NeoPixel Stemma QT / Qwiic connectorUSB A connector Stacking Stemma QT boardsHiMax HM01B0, Up to QVGA (320 x 240 @60fps) 0.96 inch LCD SPI Display (160 x 80, ST7735) 3-Axis Gyroscope 3-Axis Accelerometer 3-Axis Compass Mems MicrophoneST LSM6DSOXTR 6-axis IMU ST MP34DT06JTR MEMS Microphone ATECC608A-MAHDA-T Cryptographic CoprocessorMicro SD card reader 6 x Grove Connectors Onboard test LEDs Audio output via 3.5mm jack and buzzer RGB LED User ButtonsMX1508 Motor Controller with two DC motor outputs and motor test buttons LiPo charging 2 x WS2812B NeoPixel RGB LEDs16 Kailh hot swappable keys 16 RGB LEDsMCP73831 charger with 215mA charging current. XB6096I2S battery protector Stemma QT / Qwiic Connector Power button LED Status IndicatorsUser controllable RGB LEDMicroMod follows an M.2 form factor and as such is designed for use in carrier boards that add extra features.WS2812 Addressable LED Qwiic / Stemma QT breakoutLiPo battery charging Charge and Status LEDs WS2812 Addressable LED
First and third part accessories are the life blood of the Raspberry Pi and maker communities. They bring extra features and enable projects to be realised more easily.
With the Raspberry Pi Pico"s new form factor there is a need for new accessories and the first to market at Pimoroni, a UK based official Raspberry Pi reseller. They have released 12 new accessories for the Pico that range from simple breakout boards enabling multiple addons to be used at once, to advanced audio output devices and a VGA Demo board which uses the Programmable IO of the RP2040 to create DVI video signals. If your interests are more LED inclined then the Unicorn Pack sees 112 RGB LEDs ready to dazzle your eyeballs.
The best things about Raspberry Pi is the great community and the thousands of tutorials that have been created. From basic to complex there are great tutorials to help you learn new skills.
In the relatively short time that the Pico has been on the market, the Raspberry Pi community has already developed a ton of resources. At Tom"s Hardware, we"ve been publishing our fair share of Pico how-tos, which you can find below.
Many people are familiar with Raspberry Pi Pico now, but some people are still very unfamiliar with Pico programming using Arduino. Now this chapter will show you how to program Pico with Arduino and display some pictures on the 1.44inch LCD.
First, I prepared the important roles of this project: Raspberry Pi Pico and 1.44inch LCD. Instead of preparing the display that I had to connect with Pico by many jump lines, I used a Pico kit board that features a 1.44inch LCD. It was convenient and save a lot of time that might have been wasted connecting the screen to the Pico.
ThePico kitboard is designed for using Pico conveniently, not only integrated the display but also provide three keys as GPIO input, three LEDs and one buzzer as the GPIO output. In addition to, for expansion to plug kinds of the sensor module, it also provides many interfaces supported UART, I2C, ADC and GPIO. All the pins of the Pico have been available by the 2.54mm interface.
Focus on the 1.44inch LCD, the schematic is shown as the picture. The LCD is controlled by the ST7735 driver, and it connects with the Pico by SPI way. The detail of the connection as the below:LCD <------ Pico
Common images are JPG format or PNG format with different sizes. 1, 44inch LCD has 128*128 pixels so that it requires to cut or compress the image to 128*128. Convert images into the formats required for UTFT libraries for Arduino with an image converter tool. The converter tool link is:http://www.rinkydinkelectronics.com/t_imageconverter565.php
The version of Arduino IDE I used is V1.8.10, and all the steps I did were base on it. When you use Arduino uploading to Pico first time, follow the steps to start:
1. Install the development library of Pico, open Arduino IDE, and click “Tools->Board->Boards Manager”; search the “Pico” and install the library “Arduino Mbed OS RP2040 Boards”. The library installation is completed.
The firmware of Arduino for Pico will be loaded to your Pico board, and you can use your PICO as the normal ARDUINO BOARD. If you want to program Pico with MicroPython, you have to load the MicroPython firmware to it again.
The Raspberry Pi Pico is a low-cost, high-performance microcontroller board with a flexible digital interfaces. It"s similar to an Arduino in that it provides only microcontroller functionality, executing programming in MicroPython or C++. It can be programmed by USB using a Raspberry Pi board, PC, Mac, etc. You can read more about its development and custom chip on the Pi Foundation Blog!
The Pico does not include GPIO or debugging pins, so you"ll need to purchase and attach the variety of your choice. We suggest a solder-in header like our
The Raspberry Pi Pico is the first product built on silicon designed in-house at Raspberry Pi (“Raspberry Silicon”). At its heart is RP2040, a Raspberry Pi-designed chip, which features two ARM Cortex-M0+cores clocked at 133MHz; 256KB RAM; 30 GPIO pins; and a broad range of interfacing options. This is paired with 2MB of on-board QSPI Flash memory for code and data storage.