Arduboy FX is a miniature game system the size of a credit card. Now better than ever pre-installed with over 200 games! Arduboy FX can be reprogrammed and is open source so you can learn to code and create your own games.
Ever since I bought a Raspberry Pi Pico, I'd wanted to use it for a fun and interesting project. Arduino made an announcement that the Arduino IDE has extended its supports for the Raspberry Pi RP2040 and the newborn Arduino Nano RP2040 Connect. https://blog.arduino.cc/2021/01/20/welcome-raspberry-pi-to-the-world-of-microcontrollers/
Now let's see how to make our very own Picoboy(Arduboy with Raspberry Pi RP2040).Step 1: Getting Started with Raspberry Pi Pico (Content from RPi)
Raspberry Pi Pico is a tiny, fast, and versatile board built using RP2040, a brand new microcontroller chip designed by Raspberry Pi in the UK.
• RP2040 microcontroller with 2MByte Flash
• Micro-USB B port for power and data (and for reprogramming the Flash)
• 40 pins - Exposes 26 multi-function 3.3V General Purpose I/O (GPIO), 23 GPIO are digital-only and 3 are ADC capable
• Dual-core cortex M0+ at up to 133MHz
• 264kByte multi-bank high-performance SRAM
• External Quad-SPI Flash with eXecute In Place (XIP) and 16kByte on-chip cache
• High-performance full-crossbar bus fabric
• 30 multi-function General Purpose IO (4 can be used for ADC) ◦ 1.8-3.3V IO Voltage (NOTE Pico IO voltage is fixed at 3.3V)
• 12-bit 500ksps Analogue to Digital Converter (ADC) • Various digital peripherals ◦ 2 × UART, 2 × I2C, 2 × SPI, 16 × PWM channels ◦ 1 × Timer with 4 alarms, 1 × Real-Time Counter • 2 × Programmable IO (PIO) blocks, 8 state machines total ◦ Flexible, user-programmable high-speed IO ◦ Can emulate interfaces such as SD Card and VGA
You can find the Pinout below.
Here I'll be using the Arduino IDE to program the Raspberry Pi Pico.
Open up the Arduino IDE and go to File->Preferences.
In the dialog that pops up, enter the following URL in the "Additional Boards Manager URLs" field.
Now click OK. Open the Board Manager from Tools -> Boards -> Board Manager and type pico in the search box and select Install.
Note: It might take few minutes to install and requires an internet connection.
Now, we are ready to upload the first sketch. Press and hold the BOOTSEL button while plugging in the Pico. Select the board to RaspberryPi Pico and then hit the upload button and the code is uploaded.
Here, I'd uploaded the Blink example from the Arduino IDE.
Since the avr architecture is not supported by the Raspberry Pi Pico, we will be using the Arduino micro to implement the Arduboy and the interface will be using the Raspberry Pi.
You can find the Block diagram here.
- The OLED is connected to the Arduino Micro and
- The Wii Nunchuck is connected to the Raspberry Pi Pico i2c lines.
- Button Connections are given from Raspberry Pi Pico to Arduino Micro as shown below
OLED -> Arduino Micro
OLED CS - GND
OLED DC - D4
OLED RST - D6
SPI SCK - D15
SPI MOSI - D16
ARDUINO Micro -> Raspberry Pi
BUTTON UP - A0 ->
BUTTON DOWN - A1
BUTTON LEFT - A2
BUTTON RIGHT - A3
BUTTON A - D7
BUTTON B - D8
BUZZER - D5
- Upload the ping pong game to the Arduino Leonardo
- Upload the Wii Remote code to the Raspberry Pi Pico