-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
3,214 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
cmake_minimum_required(VERSION 3.12) | ||
|
||
#include(pico-sdk/pico_sdk_init.cmake) | ||
# Pull in PICO SDK (must be before project) | ||
include(pico_sdk_import.cmake) | ||
|
||
project(rp2040_arducam) | ||
|
||
pico_sdk_init() | ||
|
||
add_executable(arducam_firmware | ||
arducam/arducam.c | ||
main.c | ||
lib/st7735.c | ||
lib/fonts.c | ||
lib/DEV_Config.c | ||
) | ||
|
||
pico_generate_pio_header(arducam_firmware ${CMAKE_CURRENT_LIST_DIR}/image.pio) | ||
|
||
target_link_libraries(arducam_firmware | ||
pico_stdlib | ||
hardware_dma | ||
hardware_i2c | ||
hardware_pio | ||
hardware_pwm | ||
hardware_spi | ||
pico_multicore | ||
) | ||
pico_enable_stdio_usb(arducam_firmware 1) | ||
|
||
pico_add_extra_outputs(arducam_firmware) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Pico4MLcbot hm01b0 camera and st7735 display demo | ||
|
||
|
||
## Hardware Connection | ||
![IMAGE ALT TEXT](photos/Pico4MLcbot.15pc.jpg) | ||
``` | ||
int PIN_LED = 25; | ||
int PIN_CAM_SIOC = 5; // I2C0 SCL | ||
int PIN_CAM_SIOD = 4; // I2C0 SDA | ||
int PIN_CAM_RESETB = 2; | ||
int PIN_CAM_XCLK = 3; | ||
int PIN_CAM_VSYNC = 16; //GP15 hsync GP14 pixel clock | ||
int PIN_CAM_Y2_PIO_BASE = 6; // data GPIO6 | ||
int EPD_RST_PIN = 7; // st7735 display | ||
int EPD_DC_PIN = 9; | ||
int EPD_CS_PIN = 13; | ||
int EPD_CLK_PIN = 10; | ||
int EPD_MOSI_PIN = 11; | ||
int DRV8833_AIN2 = 21; // forw left | ||
int DRV8833_AIN1 = 20; // back left | ||
int DRV8833_BIN1 = 19; // forw right | ||
int DRV8833_BIN2 = 18; // back right | ||
int ESP1_RX = 0; // ESP8285 for Wifi | ||
int ESP1_TX = 1; | ||
``` | ||
|
||
## Clone repo | ||
```bash | ||
git clone https://github.com/Hermann-SW/RPI-Pico-Cam.git | ||
``` | ||
## Compile rp2040_hm01b0_st7735 demo | ||
```bash | ||
cd RPI-Pico-Cam/rp2040_hm01b0_st7735 | ||
mkdir build | ||
cd build | ||
cmake .. | ||
cd build | ||
make | ||
``` | ||
## Copy the arducam_firmware.uf2 to pico | ||
```bash | ||
cp arducam_firmware.uf2 /media/pi/RPI-RP2/ | ||
``` | ||
|
||
## Comments | ||
|
||
It turned out that "capture camera frame, then show on display" loop runs sqrt(2) times faster on core1 (higher processing framerate). In addition another factor 2 was achieved by going to the "safe" double frequency 250MHz overclocking. With that, now 15.6 frames per second get shown on 160x80 display. | ||
|
||
## test | ||
[https://www.youtube.com/watch?v=CXhm8GdwkNc](https://www.youtube.com/watch?v=CXhm8GdwkNc) | ||
![IMAGE ALT TEXT](photos/Pico4ML-BLE.anim.gif) | ||
![IMAGE ALT TEXT](photos/20211207_202449.part.50pc.jpg) | ||
![IMAGE ALT TEXT](photos/20211207_220948.part.25pc.jpg) | ||
![IMAGE ALT TEXT](photos/20211124_204656.part.20pc.jpg) | ||
|
||
## Thanks | ||
Special thanks to Hermann-SW for providing the code |
Oops, something went wrong.