• Stars
    star
    125
  • Rank 284,739 (Top 6 %)
  • Language
    C++
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PICO Arducam Examples

Table of contents

Getting started

See Getting Started with the Raspberry Pi Pico and the README in the pico-sdk for information on getting up and running.

Quick Pico Setup

If you are developing for Raspberry Pi Pico on the Raspberry Pi 4B, or the Raspberry Pi 400, most of the installation steps in this Getting Started guide can be skipped by running the setup script. You can get this script by doing the following:

git clone https://github.com/raspberrypi/pico-setup.git

Then run:

 pico-setup/pico_setup.sh

The script will:

  • Create a directory called pico
  • Install required dependencies
  • Download the pico-sdk, pico-examples, pico-extras, and pico-playground repositories
  • Define PICO_SDK_PATH, PICO_EXAMPLES_PATH, PICO_EXTRAS_PATH, and PICO_PLAYGROUND_PATH in your ~/.bashrc
  • Build the blink and hello_world examples in pico-examples/build/blink and pico-examples/build/hello_world
  • Download and build picotool (see Appendix B). Copy it to /usr/local/bin. โ€ข Download and build picoprobe (see Appendix A).
  • Download and compile OpenOCD (for debug support)
  • Download and install Visual Studio Code
  • Install the required Visual Studio Code extensions (see Chapter 6 for more details)
  • Configure the Raspberry Pi UART for use with Raspberry Pi Pico

Once it has run, you will need to reboot your Raspberry Pi,

sudo reboot

Get Arducam

  • Download RPI-Pico-Cam
git clone https://github.com/ArduCAM/RPI-Pico-Cam.git
  • Compile
cd RPI-Pico-Cam/arducam_demo
mkdir build 
cd build 
cmake ..

IMAGE ALT TEXT

make

IMAGE ALT TEXT
Then you will creat some files under RPI-Pico-Cam/arducam_demo/build/Arducam path

Bin Description
arducam_demo.elf which is used by the debugger.
arducam_demo.uf2 which can be dragged onto the RP2040 USB Mass Storage Device.

IMAGE ALT TEXT

Test Arducam demo

App Description
arducam_demo This is a video streaming demo.
  • Hardware connection

IMAGE ALT TEXT

  • Load and run arducam_demo The simplest method to load software onto a RP2040-based board is by mounting it as a USB Mass Storage Device. Doing this allows you to drag a file onto the board to program the flash. Go ahead and connect the Raspberry Pi Pico to your Raspberry Pi using a micro-USB cable, making sure that you hold down the BOOTSEL button to force it into USB Mass Storage Mode. IMAGE ALT TEXT

If you are logged in via ssh for example, you may have to mount the mass storage device manually:

$ dmesg | tail
[ 371.973555] sd 0:0:0:0: [sda] Attached SCSI removable disk
$ sudo mkdir -p /mnt/pico
$ sudo mount /dev/sda1 /mnt/pico

If you can see files in /mnt/pico then the USB Mass Storage Device has been mounted correctly:

$ ls /mnt/pico/
INDEX.HTM INFO_UF2.TXT
Copy your arducam_demo.uf2 onto RP2040:
sudo cp arducam_demo.uf2 /mnt/pico
sudo sync

Person Detection

  • Download RPI-Pico-Cam
git clone https://github.com/ArduCAM/RPI-Pico-Cam.git
  • Compile
cd RPI-Pico-Cam/tflmicro
mkdir build 
cd build 
cmake ..

IMAGE ALT TEXT

make

IMAGE ALT TEXT
Then you will creat some files under RPI-Pico-Cam/tflmicro/build/examples/person_detection path

Bin Description
person_detection_int8.uf2 This is the main program of person_detection, which can be dragged onto the RP2040 USB Mass Storage Device.
person_detection_benchmark.uf2 This is the benchmark program of person_detection, you can use it to test the performance of person_detection on pico.
image_provider_benchmark.uf2 This is the benchmark program of image_provider, you can use it to test the performance of image data acquisition.
Tips: If you don't want to compile, you can use the above pre-built uf2 file, you only need to wire the hardware and download uf2 to the device.

IMAGE ALT TEXT

Test Person Detection

App Description
person_detection_int8 This is a person detection demo.
  • Hardware connection

IMAGE ALT TEXT

  • Load and run person_detection The simplest method to load software onto a RP2040-based board is by mounting it as a USB Mass Storage Device. Doing this allows you to drag a file onto the board to program the flash. Go ahead and connect the Raspberry Pi Pico to your Raspberry Pi using a micro-USB cable, making sure that you hold down the BOOTSEL button to force it into USB Mass Storage Mode. IMAGE ALT TEXT

If you are logged in via ssh for example, you may have to mount the mass storage device manually:

$ dmesg | tail
[ 371.973555] sd 0:0:0:0: [sda] Attached SCSI removable disk
$ sudo mkdir -p /mnt/pico
$ sudo mount /dev/sda1 /mnt/pico

If you can see files in /mnt/pico then the USB Mass Storage Device has been mounted correctly:

$ ls /mnt/pico/
INDEX.HTM INFO_UF2.TXT

Copy your person_detection_int8.uf2 onto RP2040:

sudo cp examples/person_detection/person_detection_int8.uf2 /mnt/pico
sudo sync

View output

The person detection example outputs some information through usb, you can use minicom to view:

minicom -b 115200 -o -D /dev/ttyACM0

minicom_output

The person detection example also outputs the image data and person detection results to the UART, and we provide a processing program to display them:

no-person person

Tips: You can download the Processing here or Processing for Pi.

Person Detection Diagram

Person Detection Diagram

Person Detection Screen

  • Download RPI-Pico-Cam
git clone https://github.com/ArduCAM/RPI-Pico-Cam.git
  • Compile
cd RPI-Pico-Cam/tflmicro
mkdir build 
cd build 
cmake ..

IMAGE ALT TEXT

make

IMAGE ALT TEXT
Then you will creat some files under RPI-Pico-Cam/tflmicro/build/examples/person_detection_screen path

Bin Description
person_detection_screen_int8.uf2 This is the main program of person_detection_screen, which can be dragged onto the RP2040 USB Mass Storage Device.

Tips: If you don't want to compile, you can use the above pre-built uf2 file, you only need to wire the hardware and download uf2 to the device.

IMAGE ALT TEXT

Test Person Detection Screen

App Description
person_detection_screen_int8 This is a person detection screen demo.
  • Hardware requirements

IMAGE ALT TEXT

Learn more here: pico4ml-an-rp2040-based-platform-for-tiny-machine-learning

  • Load and run person_detection_screen The simplest method to load software onto a RP2040-based board is by mounting it as a USB Mass Storage Device. Doing this allows you to drag a file onto the board to program the flash. Go ahead and connect the Raspberry Pi Pico to your Raspberry Pi using a micro-USB cable, making sure that you hold down the BOOTSEL button to force it into USB Mass Storage Mode. IMAGE ALT TEXT

If you are logged in via ssh for example, you may have to mount the mass storage device manually:

$ dmesg | tail
[ 371.973555] sd 0:0:0:0: [sda] Attached SCSI removable disk
$ sudo mkdir -p /mnt/pico
$ sudo mount /dev/sda1 /mnt/pico

If you can see files in /mnt/pico then the USB Mass Storage Device has been mounted correctly:

$ ls /mnt/pico/
INDEX.HTM INFO_UF2.TXT

Copy your person_detection_screen_int8.uf2 onto RP2040:

sudo cp examples/person_detection_screen/person_detection_screen_int8.uf2 /mnt/pico
sudo sync

View output

The person detection screen example outputs some information through usb, you can use minicom to view:

minicom -b 115200 -o -D /dev/ttyACM0

minicom_output

The person detection screen example also outputs the image data and person detection screen results to the UART, and you can see them directly on the screen. no-person{} person

More Repositories

1

Arduino

This is ArduCAM library for Arduino boards
C++
472
star
2

MIPI_Camera

C
230
star
3

RaspberryPi

This is Arducam camera demos used on Raspberry Pi paltform
C
163
star
4

ArduCAM_USB_Camera_Shield

This is the repository for ArduCAM USB Camera Shield
C++
125
star
5

ArduCAM_ESP8266_UNO

This Arduino IDE for ArduCAM ESP8266 UNO Board with Integrated ArduCAM Library and Examples
C
82
star
6

ArduCAM_ESP32S_UNO

ArduCAM ESP32 Series Development Boards
C
50
star
7

Arducam_tof_camera

C++
49
star
8

Arducam-Pivariety-V4L2-Driver

This driver is used for Arducam mipi camera with Pivariety board
C
37
star
9

PICO_SPI_CAM

C++
36
star
10

PTZ-Camera-Controller

Python
26
star
11

RPI_Motorized_IRCut_Control

It is a repository for controlling the motorized IRcut filter of Raspberry pi camera
C++
26
star
12

ArduCAM_ESP32S_UNO_PSRAM

C
23
star
13

picamera2_examples

Python
20
star
14

PCA9685

This library is used for Arducam Pan Tilt Camera for Raspberry Pi
C
18
star
15

Nvidia_Jetson

This is Arducam repository for Nvidia Jetson cameras
Python
16
star
16

WIFI_Camera

ArduCAM WIFI Camera
C
15
star
17

STM32

C
15
star
18

IMX519_AK7375

C
15
star
19

Arducam_Mega

C
14
star
20

BeagleboneBlack

This a ArduCAM library ported for BeagleboneBlack board
C
13
star
21

Arducam_OBISP_MIPI_Camera_Module

C
12
star
22

ArducamUVCPythonDemo

Python
8
star
23

Pico4ML_AdapterBoard

C++
8
star
24

ArducamCameraControl

Python
8
star
25

Jetson_IMX519_Focus_Example

Python
7
star
26

Pico4ML-Magic-Wand

C
6
star
27

OAK_Nvidia_Jetson_ROS_SLAM_VINS

running vins_slam algorithm with OAK camera on jetson platform.
C++
6
star
28

Energia

Energia IDE for ArduCAM CC3200 UNO board
C
5
star
29

Sensor-Regsiter-Decoder

Decode the binary form of sensor register settings into human readable format
Jupyter Notebook
5
star
30

ov9281_driver

This direr is used for Arducam UC-788 Rev.B ov9281 camera module
C
5
star
31

Camarray_HAT

Python
4
star
32

ArduCAM_USB_Camera_Shield_Python_Demo

Python
4
star
33

Jetson_IMX708_Focus_Example

Python
3
star
34

LCD_st7735

C
3
star
35

ArduCAM_USB_Camera_Shield_Config

2
star
36

ArduCAM_USB_Camera_Shield_Cpp_Demo

C++
2
star
37

Arducam_mini

C
2
star
38

Nvidia_Jetson_ROS_SLAM_VINS

C++
2
star
39

arducam_ppa

Shell
1
star
40

Nvidia_Jetson_ROS_SGM

C++
1
star
41

Arducam_RK_Driver

Python
1
star
42

PX_IMC01_RPI

C++
1
star
43

Edison

This is ported version of ArduCAM library for Intel Edison
C
1
star
44

NativePiCamera

C
1
star
45

Arducam_uvc_camera

Used to release samples for arducam_uvc_camera
Python
1
star
46

Arducam_OBISP_MIPI_Camera_Module_temporary

1
star
47

ArduCam_EVK_Demo

C
1
star
48

Arducam_dvp

SDK for Arducam dvp interface camera
C++
1
star
49

raspberrypi_utils

Python
1
star
50

ICM20948

C++
1
star
51

OctoPrint_Arducam_Plugin

Python
1
star
52

NeuroShield

C++
1
star
53

arducam_hm01b0

C
1
star