Install Earle Philhower Raspberry Pi Pico Arduino core to fix error: 'rp2040' was not declared in this scope

It's next Adafruit_ImageReader exercises run on Raspberry Pi Pico to load images from SD Card, and display on 320x240 IPS SPI ILI9341 Module using using Adafruit_ILI9341 library, following Adafruit GFX Graphics Library > Loading Images.

But, if compile using Arduino Mbed OS RP2040 Boards, will fail with
error: 'rp2040' was not declared in this scope



This video show how to install Earle Philhower Raspberry Pi Pico Arduino core on Arduino IDE 2.


In Arduino IDE
> File > Preferences...

Add the line in Additional Boards Manager URLs.
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

Install Raspberry Pi Pico/RP2040 by Earle F. Philhower III in Boards Manager.

Select board of Raspberry Pi Pico/RP2040 > Raspberry Pi Pico

If fail with error like:
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

Remove and install Raspberry Pi Pico/RP2040 again.



Related:
Raspberry Pi Pico W (Arduino Framework) display on 0.85 inch 128x128 LCD with GC9107 SPI driver.

Comments

Popular posts from this blog

MicroPython/ESP32-C3 + 1.8" 128x160 TFT ST7735 SPI, using boochow/MicroPython-ST7735 library.

CameraWebServe: ESP32-S3 (arduino-esp32) + OV5640 camera module