Skip to content

Commit 1a2410c

Browse files
committed
Docs Review Update
Docs update for release. Adjusting format to separate software sections & final review updates/edits.
1 parent 9a82dca commit 1a2410c

18 files changed

+274
-75
lines changed
59 KB
Loading

docs/assets/img/arducam_image1.png

1.22 MB
Loading

docs/assets/img/arducam_image2.png

101 KB
Loading

docs/basic_assembly.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
icon: material/tools
3+
---
4+
5+
Getting started with the Pro Micro - RP2350 is as easy as plugging it in over USB. The board ships with simple code that cycles the WS2812 RGB LED through a rainbow so on initial power up you should see that cycle.
6+
7+
<figure markdown>
8+
[![Simple USB-C assembly](./assets/img/Pro_Micro_USB_Assembly.jpg){ width="400"}](./assets/img/Pro_Micro_USB_Assembly.jpg "Click to enlarge")
9+
</figure>
10+
11+
From here, you can quickly get started programming the board with either the Pico SDK or MicroPython. If you'd like to quickly get started with a variety of I<sup>2</sup>C devices, SparkFun carries a variety of Qwiic boards with MicroPython support such as the [Optical Tracking Odometry Sensor](https://www.sparkfun.com/products/24904) as shown in the assembly photo below:
12+
13+
<figure markdown>
14+
[![Qwiic assembly with the Optical Odometry sensor](./assets/img/Pro_Micro_USB_Qwiic_Assembly.jpg){ width="400"}](./assets/img/Pro_Micro_USB_Qwiic_Assembly.jpg)
15+
</figure>
16+
17+
18+

docs/bootloader.md

-9
This file was deleted.

docs/hardware_assembly.md renamed to docs/camera_assembly.md

+7-22
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
1-
---
2-
icon: material/tools
3-
---
41

5-
## Basic Assembly
62

7-
Getting started with the Pro Micro - RP2350 is as easy as plugging it in over USB. The board ships with simple code that cycles the WS2812 RGB LED through a rainbow so on initial power up you should see that cycle.
83

9-
<figure markdown>
10-
[![Simple USB-C assembly](./assets/img/Pro_Micro_USB_Assembly.jpg){ width="400"}](./assets/img/Pro_Micro_USB_Assembly.jpg "Click to enlarge")
11-
</figure>
12-
13-
From here, you can quickly get started programming the board. If you'd like to quickly get started with a variety of I<sup>2</sup>C devices, SparkFun carries a variety of Qwiic boards with MicroPython support such as the [Optical Odometry Sensor]() as shown in the assembly photo below:
14-
15-
<figure markdown>
16-
[![Qwiic assembly with the Optical Odometry sensor](./assets/img/Pro_Micro_USB_Qwiic_Assembly.jpg){ width="400"}](./assets/img/Pro_Micro_USB_Qwiic_Assembly.jpg)
17-
</figure>
184

19-
## Camera Example Assembly
5+
!!! attention "Important!"
6+
This is an advanced example that assumes users are familiar with using the [Pico SDK](https://www.raspberrypi.com/documentation/pico-sdk/) to build and run projects. If you have not previously used the Pico SDK we strongly encourage going through Raspberry Pi's tutorials on getting started with it before continuing with this example.
207

21-
If you'd like to follow along with the Camera Example in this guide, you'll need to connect the Arducam M5 camera module to the Pro Micro over both SPI and I<sup>2</sup>C as well as connections for input voltage and ground. We recommend soldering male headers to the Pro Micro as the photo below shows and then plugging it into a breadboard for easy prototyping.
8+
If you'd like to follow along with the Arducam PRSAM Demo in this guide, you'll need to connect the Arducam M5 camera module to the Pro Micro over both SPI and I<sup>2</sup>C as well as connections for input voltage and ground. We recommend soldering male headers to the Pro Micro as the photo below shows and then plugging it into a breadboard for easy prototyping.
229

2310
<figure markdown>
2411
[![Male headers soldered to the Pro Micro.](./assets/img/Pro_Micro_Headers.jpg){ width="400"}](./assets/img/Pro_Micro_Headers.jpg "Click to enlarge")
@@ -54,11 +41,11 @@ Next, connect the Arducam wire harness to the camera assembly if you have not al
5441
<td>CS</td>
5542
</tr>
5643
<tr>
57-
<td>4</td>
44+
<td>3</td>
5845
<td>MOSI/COPI</td>
5946
</tr>
6047
<tr>
61-
<td>3</td>
48+
<td>4</td>
6249
<td>MISO/CIPO</td>
6350
</tr>
6451
<tr>
@@ -83,12 +70,10 @@ Next, connect the Arducam wire harness to the camera assembly if you have not al
8370
</tr>
8471
</table>
8572

86-
??? note "Pull-Down Jumper"
87-
Not listed in the table above is the pull-down jumper between A3 and Ground. This jumper switches the example between "Standard" and "High Contrast" modes.
73+
Finally, you'll want to connect a jumper wire between <b>A3</b> and <b>GND</b>. The code refers to the state of A3/GPIO29 (called 29 in the code) to run the image processing algorithm. The code sets A3/GPIO29 as an input with an internal pull-up resistor enabled. When the pin is pulled LOW through the jumper wire there is no image processing and the image should appear as a normal greyscale. When the jumper is removed, the code enables the processing algorithm to apply image thresholding.
8874

8975
With the wiring completed, it should look similar to the photo below
9076

9177
<figure markdown>
9278
[![Close up shot of completed camera wiring](./assets/img/Pro_Micro_Camera_Wiring.jpg){ width="400"}](./assets/img/Pro_Micro_Camera_Wiring.jpg "Click to enlarge")
93-
</figure>
94-
79+
</figure>

docs/camera_demo.md

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
2+
3+
4+
5+
!!! attention "Important!"
6+
This is an advanced example that assumes users are familiar with using the [Pico SDK](https://www.raspberrypi.com/documentation/pico-sdk/) to build and run projects. If you have not previously used the Pico SDK we strongly encourage going through Raspberry Pi's tutorials on getting started with it before continuing with this example.
7+
8+
The Arducam PSRAM Example is a modified version of [Arducam's Videostreaming example](https://github.com/ArduCAM/PICO_SPI_CAM/tree/master/C/Examples/Arducam_MINI_5MP_Plus_Videostreaming) that uses the Arducam to take still images and send them to the RP2350 and then process and transmit the images over USB to be displayed using a [Processing](https://processing.org/) sketch. The primary goal of this example is to demonstrate how to set up and use PSRAM on the Pro Micro - RP2350 using the Pico SDK and the cool images are a neat bonus!
9+
10+
## Software Requirements
11+
12+
Along with the Pico SDK, you'll need to install the following items for this demo to run properly.
13+
14+
### Pico SDK Cam Driver
15+
16+
This example uses the Pico SDK, Arducam's Pico Cam driver for the SDK. The example files include the necessary Arducam driver installation but if you'd like to install it separately you can find it in the ArduCAM GitHub repo [here](https://github.com/ArduCAM/PICO_SPI_CAM).
17+
18+
### Processing Software
19+
20+
You'll also need to download and install the [Processing](https://processing.org/) software. You can download the program by clicking the button below:
21+
22+
<center>
23+
[Processing Downloads Page](https://processing.org/download){ .md-button .md-button--primary}
24+
</center>
25+
26+
### Arducam Demo Files
27+
28+
We've included pretty much everything you'll need to run the example in the Pro Micro - RP2350 GitHub repository [here](https://github.com/sparkfun/SparkFun_Pro_Micro_RP2350/tree/main/Examples/Arducam_Demo). If you'd like to download a compressed (ZIP) copy of the repository, click the button below:
29+
30+
<center>
31+
[SparkFun Pro Micro - RP2350 Github Repository (ZIP)](https://github.com/sparkfun/SparkFun_Pro_Micro_RP2350/archive/refs/heads/main.zip){ .md-button .md-button--primary}
32+
</center>
33+
34+
The C++, .uf2, and cmake.txt files for the example can be found in the "<b>/Examples/Arducam_Demo</b>" folder. Take note of where these are as we'll need them later on.
35+
36+
## Uploading and Running Demo
37+
38+
With the Pico SDK set up on your computer, use the following command from the example directory to build the project:
39+
40+
``` c++
41+
mkdir build
42+
cd build
43+
cmake .. -DPICO_PLATFORM=rp2350 -DPICO_BOARD=sparkfun_promicro_rp2350
44+
make
45+
```
46+
47+
Next, set the Pro Micro in boot mode and upload the .uf2 file to the board.
48+
49+
### Processing Sketch
50+
51+
Now that the Pro Micro - RP2350 is running the demo code, open the Processing sketch included in the GitHub repository download. Finally, click the "Run" button in the top left of the Processing window and it should open a new window to display the images the camera is taking. We've done our best to speed up the time between the Arducam capturing an image and displaying it on the computer but it can take a few seconds in between shots. With the camera steady, you should start to see greyscale images like this fancy photo of the ceiling in the SparkFun engineering department:
52+
53+
<figure markdown>
54+
[![Greyscale screenshot for Arducam demo.](./assets/img/arducam_image1.png){ width="400"}](./assets/img/arducam_image1.png "Click to enlarge")
55+
</figure>
56+
57+
Now try unplugging the jumper wire between A3 and GND and the next images should be in purely black and white (thresholded) like the screenshot below:
58+
59+
<figure markdown>
60+
[![Black and white screenshot for Arducam demo.](./assets/img/arducam_image2.png){ width="400"}](./assets/img/arducam_image2.png "Click to enlarge")
61+
</figure>
62+
63+
## PSRAM Code to Note
64+
65+
!!! note "Pico SDK PSRAM Support"
66+
The Pico SDK may include official PSRAM support for the Pro Micro - RP2350 in the future. This is simply a demo to get users started while that support is being implemented.
67+
68+
The primary goal of this demo is to show how to implement and use PSRAM in your own projects. It's fairly involved and requires overriding the default PSRAM allocations to work with the Pro Micro.
69+
70+
### CMakeLists.txt
71+
72+
The CMakeLists.txt file includes the commands to override the default allocation to use a custom allocation created in the "sfe_pico_alloc" folder.
73+
74+
```
75+
# use our own allocator
76+
set(SKIP_PICO_MALLOC 1)
77+
```
78+
79+
It then adds a subdirectory called "sfe_pico_alloc" to import the custom PSRAM memory allocation for the Pro Micro - RP2350.
80+
81+
```
82+
add_subdirectory(sfe_pico_alloc)
83+
84+
# pull in common dependencies and additional spi hardware support
85+
target_link_libraries(arducam_demo
86+
pico_stdlib
87+
hardware_dma
88+
hardware_i2c
89+
hardware_pwm
90+
ArduCAM
91+
sfe_pico_alloc
92+
)
93+
```
94+
95+
### C++ PSRAM
96+
97+
The code snippet below shows how to configure and use PSRAM with <code>malloc()</code>.
98+
99+
``` c++
100+
// Create buffer to store image. In this demo, malloc() has been configure to
101+
// use the PSRAM of the SparkFun Pro Micro RP2350, so you don't need to do
102+
// anything else to use the PSRAM!
103+
imageBuf = (uint8_t*) malloc(nRows * nCols);
104+
if (!imageBuf)
105+
{
106+
// Always good practice to verify that malloc() worked
107+
printf("Malloc failed! Exiting example\n");
108+
return 1;
109+
}
110+
```

docs/examples.md

-11
This file was deleted.

docs/hardware_overview.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ The RP2350 from Raspberry Pi packs a whole lot of computing punch in a tiny pack
1212
[![Photo highlighting RP2350.](./assets/img/Pro_Micro_RP2350-RP2350.jpg){ width="400"}](./assets/img/Pro_Micro_RP2350-RP2350.jpg "Click to enlarge")
1313
</figure>
1414

15-
This internal configuration allows users to customize the chip to their preferred architecture or to use one of each! The RP2350 includes 520kB of on-chip SRAM in ten independent banks and 8kB of one-time-programmable (OTP) storage. It also has an impressive set of security features including optional boot signing with protected OTP storage for the boot decryption key, global bus filtering (based on either Arm or RISC-V security and privilege levels) and more.
15+
This internal configuration allows users to customize the chip to their preferred architecture or to use one of each! The RP2350 includes 520kB of on-chip SRAM in ten independent banks and 8kB of one-time-programmable (OTP) storage. It also has an impressive set of security features including optional boot signing with protected OTP storage for the boot decryption key, global bus filtering (based on either Arm or RISC-V security and privilege levels) and more. For a complete overview of the RP2350, refer to the [datasheet]().
1616

17-
The Pro Micro - RP2350 uses the "A" version of the microcontroller which has 30 5V-tolerant GPIO with 4 analog inputs and also includes the following peripheral options:
17+
The Pro Micro - RP2350 uses the "A" version of the microcontroller which has 30 3.3V-tolerant GPIO with 4 analog inputs and also includes the following peripheral options:
1818

1919
* 2x UART
2020
* 2x SPI

docs/introduction.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
icon: material/book-open-page-variant
33
---
44

5-
# Hookup Guide
6-
7-
8-
## Introduction
9-
<!-- Single Product Card -->
10-
115
<div class="grid cards desc" markdown>
126

137
- <a href="https://www.sparkfun.com/products/24870">
@@ -28,6 +22,8 @@ icon: material/book-open-page-variant
2822

2923
- The SparkFun Pro Micro - RP2350 provides a powerful development platform in SparkFun's compact Pro Micro form factor built around the RP2350 from the Raspberry Pi Foundation. This board uses the updated Pro Micro form factor and includes a USB-C connector, Qwiic connector, WS2812B addressable RGB LED, Boot and Reset buttons, resettable PTC fuse as well as PTH and castellated solder pads. This board also includes external memory for the RP2350 with 16MB Flash and 8MB PSRAM both tied to the RP2350's QSPI controller.
3024

25+
The RP3250 is a unique dual-core microcontroller with two ARM<sup>&reg;</sup> Cortex<sup>&reg;</sup> M33 processors and two Hazard3 RISC-V processors, all running at up to 150 MHz! Now, this doesn't mean the RP2350 is a quad-core microcontroller. Instead, users can select which two processors to run on boot instead. You can run two processors of the same type or one of each. The RP2350 also features 520kB SRAM in ten banks, a host of peripherals including two UARTs, two SPI and two I<sup>2</sup>C controllers, and a USB 1.1 controller for host and device support.
26+
3127
<center>
3228
[Purchase from SparkFun :fontawesome-solid-cart-plus:{ .heart }](https://www.sparkfun.com/products/24870){ .md-button .md-button--primary }
3329
</center>

docs/micropython_examples.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
icon simple/micropython
3+
---
4+
5+
## Verify MicroPython Firmware & Hardware
6+
7+
First, to make sure everything is running properly, use the <code>sys</code> module to verify the firmware version and machine/board running. Open your preferred interface and enter the following prompts and you should see something similar to the printout below:
8+
9+
``` py
10+
>>> import sys
11+
>>> sys.implementation
12+
(name='micropython', version=(1, 24, 0, 'preview'), _machine='SparkFun Pro Micro RP2350 with RP2350', _mpy=7942)
13+
```
14+
15+
## Verify Memory (Internal and PSRAM)
16+
17+
Next, we can verify the total free memory on the Pro Micro which includes the built-in memory on the RP2350 as well as the 8MB PSRAM. We'll use the <code>gc</code> module for this so type in the prompt below and you should see a response close to the value below:
18+
19+
``` py
20+
>>> import gc
21+
>>> gc.mem_free()
22+
8640352
23+
```
24+
25+
26+
27+
## WS2812 LED Control
28+
29+
Finally, we'll make sure we can properly control the WS2812 LED on the Pro Micro using the <code>machine</code> and <code>neopixel</code> classes. The WS2812 Data In pin connects to I/O 25 on the RP2350 so we'll create a pin for it as an OUTPUT and assign it to the LED object. Next, we'll set the color to red and finally write the color values to the LED. The code below goes through all these steps so try copying it on your machine and you should see the WS2812 LED turn red.
30+
31+
``` py
32+
>>> import machine, neopixel
33+
>>> pin = machine.Pin(25, machine.Pin.OUT)
34+
>>> led = neopixel.NeoPixel(pin, 1)
35+
>>> n[0] = (255, 0, 0)
36+
>>> n.write()
37+
```
38+
39+
Try playing around with other values between 0 and 255 for the three colors (R, G, B) and then writing the changes to switch the LED's displayed color.

docs/micropython_setup.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
3+
4+
5+
## Setup
6+
7+
MicroPython is an application of the Python 3 language that runs on microcontrollers like the Pro Micro - RP2350 that allows you to easily interact with the board directly over a USB serial interface through either a command line interface or your preferred Python IDE such as [Thonny](https://thonny.org/). We'll do a quick overview of how to download MicroPython firmware on to the Pro Micro - RP2350 but for a complete overview of using MicroPython with this and other RP2350 boards, head over to Raspberry Pi's documentation by clicking the button below:
8+
9+
<center>
10+
[Raspberry Pi MicroPython Docs](https://www.raspberrypi.com/documentation/microcontrollers/micropython.html){ .md-button .md-button--primary}
11+
</center>
12+
13+
## UF2 Firmware
14+
15+
As of this writing, we're waiting on the next release of MicroPython to include UF2 files for the Pro Micro - RP2350 so to get users started before then, you can download the "early release" of the UF2 firmware file by clicking the button below.
16+
17+
<center>
18+
[Pro Micro - RP2350 UF2 Firmware](https://cdn.sparkfun.com/assets/6/3/c/f/d/firmware_pro_micro_rp2350.uf2){ .md-button .md-button--primary}
19+
</center>
20+
21+
Once downloaded, put the Pro Micro - RP2350 into UF2 bootloader mode and open the location the board appeared as a USB storage device (it should appear as "RP2350"). Next, simply drag and drop the UF2 file into the RP2350 folder and the board should reboot. Next, open up your preferred MicroPython IDE (or command line interface) and you can start interacting with your Pro Micro. Read on to the MicroPython examples section for a few quick examples to make sure everything is working properly.

docs/picoSDK_setup.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
3+
4+
5+
## Raspberry Pi Pico SDK
6+
7+
The Pico C SDK is a C/C++ development kit for Raspberry Pi microcontrollers including the RP2350. Click on the links below for complete documentation on installing and using the SDK.
8+
9+
<center>
10+
[Pico C SDK Documentation](https://www.raspberrypi.com/documentation/pico-sdk/){ .md-button .md-button--primary }
11+
</center>
12+
13+
<center>
14+
[Pico C SDK GitHub Repository](https://github.com/raspberrypi/pico-sdk){ .md-button .md-button--primary }
15+
</center>

0 commit comments

Comments
 (0)