Simplified Pico VGA – Part 2
Having spent far too long chewing over how the Raspberry Pi Pico Scanvideo library works over in Simplified Pico VGA, this post actually starts to do something with it.
One constraint I have for myself, is that I want to keep using the Arduino IDE for the Pico, so the first step is to see if I can get the Scanvideo library over to an Arduino sketch. This means grabbing the files from the following locations:
- https://github.com/raspberrypi/pico-extras/tree/master/src/common/pico_scanvideo
- https://github.com/raspberrypi/pico-extras/tree/master/src/rp2_common/pico_scanvideo_dpi
- https://github.com/raspberrypi/pico-extras/tree/master/src/common/pico_util_buffer
- https://github.com/raspberrypi/pico-playground/tree/master/scanvideo
The pico_util_buffer code is used for buffer management, so that is required too. The last one houses some examples, I’m just using the https://github.com/raspberrypi/pico-playground/tree/master/scanvideo/test_pattern as a basis for my own example.
As with my other PIO experiments, I’m using the unofficial Arduino RP2040 core.
Starting the Arduino Sketch
In order to get things started, I’m just taking all the files from the above projects and dropping them directly into the Arduino Sketch folder, with no further hierarchy. My file list looks as follows:
25/07/2026 19:26 392 buffer.c
25/07/2026 19:25 2,265 buffer.h
25/07/2026 19:20 1,425 composable_scanline.h
25/07/2026 19:27 1,675 PicoScanVideo.ino
25/07/2026 19:49 6,293 scanvideo-pio.h
25/07/2026 19:26 83,925 scanvideo.c
25/07/2026 19:24 1,949 scanvideo.h
25/07/2026 19:16 13,613 scanvideo_base.h
25/07/2026 19:49 2,488 timing-pio.h
25/07/2026 19:20 17,057 vga_modes.c
Each one of these files must be edited to change the include paths to drop down to a single directory.
There are three files here that are not in the original libraries. The .ino I’ll come to shortly, but the two *-pio.h files are the assembled files from the two original .pio files. These are created using https://wokwi.com…