Program the Pico Explorer with Arduino IDE

You can program the Raspberry Pi PICO which is used in “Pico Explorer” and several
other boards

In the Arduino IDE go to Tools >board>board manager
Search for Raspberry Pi PICO, install ”Raspberry Pi PICO/RP2040” by Earle F. Philhouser

Select board >Raspberry Pi RP2040 boards>Raspberry Pi Pico
Next plug PICO into USB while holding BOOT Button down , release after 2 seconds
Next go to FILE>Examples>01.Basics>Blink which will load blink script
Hit Upload arrow it will install Blink, system LED will start to blink
After first Upload a port will be assigned
For all next programs you want to Upload you will have to select a port from Tools>Port
From now on the PICO can be treated as an Arduino board with an assigned port
To get the screen working on the “pico explorer” you must install two library files
“Adafruit_GFX” and “Adafruit ST7735 and ST7789 Library”
Go to File>Examples>Adafruit ST7735 and ST7789 Library>graphictest
Change values to

#define TFT_CS 17
#define TFT_RST -1 // Or set to -1 and connect to Arduino RESET pin
#define TFT_DC 16
#define TFT_MOSI 19 // Data out
#define TFT_SCLK 18 // Clock out
// OPTION 1 (recommended) is to use the HARDWARE SPI // For 1.14", 1.3", 1.54", 1.69", and 2.0" TFT with ST7789:
Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

// OPTION 2 lets you interface the display using ANY TWO or THREE PINS,
// OR for the ST7789-based displays, we will use this call
//Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
Either one will work CHOSE ONLY ONE
void setup(void) {
Serial.begin(9600);

// Use this initializer if using a 1.54" 240x240 TFT:
tft.init(240, 240); // Init ST7789 240x240

// SPI speed defaults to SPI_DEFAULT_FREQ defined in the library
// Note that speed allowable depends on chip and quality of wiring
// may end up with a black screen some times, or all the time.
tft.setSPISpeed(40000000);
YOUR BOARD WILL NOW WORK Just program it like other Arduino boards with a display screen
I will answer any questions about this use of the PICO

Thanks for that, so that’s C++?
Adafruit has a long list of resources for Arduino and other micro controllers. I’ve run Circuit Python on one or two of my PICOs. Haven’t gone the Arduino IDE route just yet though.

I have several Breakout Garden setups, Pi and PICO. And I have the Breakout version of the Explorer screen. It’s nice to be able to use the same breakouts on a PI setup or PICO setup.

Thanks for useful information. It worked for me after I commented out,

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_RST);

and uncommented

Adafruit_ST7789 tft = Adafruit_ST7789(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);

Awesome, thank you. Works amazing.

Shame I can’t get the a, b, x, y buttons on the Pico Explorer Base to work in Arduino IDE uptill now. Any suggestions?

const int A = 12;
const int B = 13;
const int X = 14;
const int Y = 15;
void setup() {
pinMode(A, INPUT_PULLUP);
pinMode(B, INPUT_PULLUP);
pinMode(X, INPUT_PULLUP);
pinMode(Y, INPUT_PULLUP);

Serial.begin(9600);
}

void loop() {
int stateButtonA = digitalRead(A);
int stateButtonB = digitalRead(B);
int stateButtonX = digitalRead(X);
int stateButtonY = digitalRead(Y);
Serial.print(stateButtonA);
Serial.print(stateButtonB);
Serial.print(stateButtonX);
Serial.println(stateButtonY);

delay(1000);
}

Amazing man, this works. Greatly appreciated! Didn’t see your reply, untill now, even though I have notifications on. But thank you very much!

I feel like a muppet, but I seemingly can’t get breakouts to work in Arduino. For instance, I’ve gotten these breakout;

Breakout 11x7 matrix (11x7 LED Matrix Breakout)
or the breakout BMP280

And I’ve tried learning from these libraries in combination with Arduino IDE;

But I just can’t seem to get it to work on the Pico Explorer. Any suggestions?

Using the correct i2c pins, sda is GP20 and scl is GP21.

GOTO

run the program and change

Wire.begin();
Serial.begin(9600);
Serial.println(“\nI2C Scanner\n”);
TO
Wire.setSDA(20);
Wire.setSCL(21);
Wire.begin();
Serial.begin(9600);
while (!Serial); // Leonardo: wait for serial monitor
Serial.println(“\nI2C Scanner”);

This shows what you have to do BUT most librarys expect I2C to be on
Wire.setSDA(4);
Wire.setSCL(5);
most adafruit librarys WILL NOT WORK
GOOD LUCK

Thanks once again. I modified the standard Adafruit_IS31FL3731 library and for the rest used your hints to make the LED Matrix work. Now the BMP280 is next on my list. But I hope I’ll manage with the suggestions given.