Skip to content

Commit

Permalink
Merge pull request #42 from hpsaturn/devel
Browse files Browse the repository at this point in the history
Devel
hpsaturn authored May 24, 2024
2 parents 22ff014 + 71ab3de commit cd6e706
Showing 22 changed files with 361 additions and 393 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -44,4 +44,4 @@ deploy.sh
releases
releases/binaries/
releases/installer/
examples/espcamlib
examples/lib/espcamlib
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -195,6 +195,11 @@ Some examples are for Arduino users (*.ino samples), but is possible too compile

## Credits

I want to extend my gratitude to @ElectroZeusTIC and @AcoranTf for testing it on Arduino IDE. Also to @UtaAoya for your findings around the M5UnitCam device.
I want to extend my gratitude to:

- @ElectroZeusTIC and @AcoranTf for testing it on Arduino IDE.
- @UtaAoya for your findings around the M5UnitCam device.
- @MeloCuentan by issues fixes in the AI-Thinker Camera and new ESP32S3 RGB receiver.
- @turmandreams by your tests around AIThinker Camera and M5Core receiver.

---
14 changes: 9 additions & 5 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -17,14 +17,18 @@

### Receivers samples

Some video receivers

| ENV Name | Details | Status |
|:-----------------|:--------------:|:----------:|
| m5core2-basic-receiver | Video receiver [1] | STABLE |
| m5core2-espnow-receiver | Video receiver [1] | STABLE |
| m5cores3-espnow-receiver | Video receiver [1] | STABLE|
| makerfabs-basic-receiver | Video receiver [1] [2] | STABLE |
| makerfabs-nojpg-receiver | Video receiver [1] [2] | <2FPS |
| m5core2-basic-receiver | M5Stack M5Core2 [1] | STABLE |
| m5core2-espnow-receiver | M5Stack M5Core2 [1] | STABLE |
| m5cores3-espnow-receiver | M5Stack M5CoreS3 [1] | STABLE |
| makerfabs-basic-receiver | Makerfabs RGB Parallel [1] [2] | STABLE |
| makerfabs-nojpg-receiver | Makerfabs RGB Parallel [1] [2] | <2FPS |
| tft-3.5-basic-receiver | Any TFT display with LGFX [1] | STABLE |
| tft-il9485-basic-receiver | M5Core TFT reciver il9481 [1] [2]| STABLE |
| ft-rgb-hmi-basic-receiver | ESP32S3_RGB_ESP32-8048S043 [1] [2] | STABLE |

[1] Use with any sender sample
[2] Use with freenove HVGA sender sample for example.
199 changes: 0 additions & 199 deletions examples/common/ConfigApp.cpp

This file was deleted.

113 changes: 0 additions & 113 deletions examples/common/ConfigApp.hpp

This file was deleted.

74 changes: 16 additions & 58 deletions examples/freenove-tank/freenove-tank.cpp
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
#include <ESP32WifiCLI.hpp>
#include <ESPNowCam.h>
#include <common/comm.pb.h>
#include <common/ConfigApp.hpp>
#include <EasyPreferences.hpp>
#include <drivers/CamFreenove.h>
#include <ESP32Servo.h>
#include <Utils.h>
@@ -143,63 +143,21 @@ void wcli_reboot(String opts){
ESP.restart();
}

void saveInteger(String key, String v) {
int32_t value = v.toInt();
cfg.saveInt(key, value);
Serial.printf("saved: %s:%i\r\n",key.c_str(),value);
}

void saveFloat(String key, String v) {
float value = v.toFloat();
cfg.saveFloat(key, value);
Serial.printf("saved: %s:%.5f\r\n",key.c_str(),value);
}

void saveBoolean(String key, String v) {
v.toLowerCase();
cfg.saveBool(key, v.equals("on") || v.equals("1") || v.equals("enable") || v.equals("true"));
Serial.printf("saved: %s:%s\r\n", key.c_str(), cfg.getBool(key, false) ? "true" : "false");
}

void saveString(String key, String v) {
cfg.saveString(key, v);
Serial.printf("saved: %s:%s\r\n",key.c_str(),v.c_str());
}

bool isValidKey(String key) {
for (int i = 0; i < KCOUNT; i++) {
if (key.equals(cfg.getKey((CONFKEYS)i))) return true;
}
return false;
}

void wcli_kset(String opts) {
maschinendeck::Pair<String, String> operands = maschinendeck::SerialTerminal::ParseCommand(opts);
String key = operands.first();
String v = operands.second();
if(isValidKey(key)){
if(cfg.getKeyType(key) == ConfKeyType::BOOL) saveBoolean(key,v);
else if(cfg.getKeyType(key) == ConfKeyType::FLOAT) saveFloat(key,v);
else if(cfg.getKeyType(key) == ConfKeyType::INT) saveInteger(key,v);
else if(cfg.getKeyType(key) == ConfKeyType::STRING) saveString(key,v);
else Serial.println("Invalid key action for: " + key);
}
else {
Serial.printf("invalid key: %s\r\nPlease see the valid keys with klist command.\r\n",key.c_str());
}
cfg.saveAuto(key,v);
}

void wcli_klist(String opts) {
maschinendeck::Pair<String, String> operands = maschinendeck::SerialTerminal::ParseCommand(opts);
String opt = operands.first();
int key_count = KCOUNT; // Show all keys to configure
if (opt.equals("basic")) key_count = KBASIC; // Only show the basic keys to configure
Serial.printf("\n%11s \t%s \t%s \r\n", "KEYNAME", "DEFINED", "VALUE");
Serial.printf("\n%11s \t%s \t%s \r\n", "=======", "=======", "=====");

for (int i = 0; i < key_count; i++) {
if(i==KBASIC) continue;
String key = cfg.getKey((CONFKEYS)i);
for (int i = 0; i < KCOUNT; i++) {
String key = cfg.getKey((PKEYS)i);
bool isDefined = cfg.isKey(key);
String defined = isDefined ? "custom " : "default";
String value = "";
@@ -220,7 +178,7 @@ void wcli_exit(String opts) {

void wcli_debug(String opts) {
debug = !debug;
cfg.saveBool(CONFKEYS::KDEBUG, debug);
cfg.saveBool(PKEYS::KDEBUG, debug);
}

void wcli_servoL(String opts) {
@@ -241,17 +199,17 @@ void wcli_pauseCam(String opts){
}

void loadVariables() {
debug = cfg.getBool(CONFKEYS::KDEBUG, false);
debug = cfg.getBool(PKEYS::KDEBUG, false);

spanLeft = cfg.getInt(CONFKEYS::KLPAN, 18);
offsetLeft = cfg.getInt(CONFKEYS::KLOFST, 0);
degreesCenterL = cfg.getInt(CONFKEYS::KLCENT, 97);
spanLeft = cfg.getInt(PKEYS::KLPAN, 18);
offsetLeft = cfg.getInt(PKEYS::KLOFST, 0);
degreesCenterL = cfg.getInt(PKEYS::KLCENT, 97);

spanRight = cfg.getInt(CONFKEYS::KRPAN, 18);
offsetRight = cfg.getInt(CONFKEYS::KROFST, 0);
degreesCenterR = cfg.getInt(CONFKEYS::KRCENT, 100);
spanRight = cfg.getInt(PKEYS::KRPAN, 18);
offsetRight = cfg.getInt(PKEYS::KROFST, 0);
degreesCenterR = cfg.getInt(PKEYS::KRCENT, 100);

deathBand = cfg.getInt(CONFKEYS::KDBAND, 2);
deathBand = cfg.getInt(PKEYS::KDBAND, 2);

degreesMinL = degreesCenterL - spanLeft + offsetLeft;
degreesMaxL = degreesCenterL + spanLeft + offsetLeft;
@@ -268,7 +226,7 @@ void wcli_print(String opts) {
Serial.printf("RIGHT => span: %i offset: %i center: %i\r\n", spanRight, offsetRight, degreesCenterR);
Serial.printf("RIGHT => degreesMinR: %i degreesMaxR: %i\r\n\n", degreesMinR, degreesMaxR);

Serial.printf("Others => deathBand: %i periodHertz: %i\r\n", deathBand,cfg.getInt(CONFKEYS::KPHERTZ, 50));
Serial.printf("Others => deathBand: %i periodHertz: %i\r\n", deathBand,cfg.getInt(PKEYS::KPHERTZ, 50));
}

void setup() {
@@ -300,8 +258,8 @@ void setup() {
ESP32PWM::allocateTimer(2);
ESP32PWM::allocateTimer(3);

servoLeft.setPeriodHertz(cfg.getInt(CONFKEYS::KPHERTZ, 50)); // Standard 50hz servo
servoRight.setPeriodHertz(cfg.getInt(CONFKEYS::KPHERTZ, 50)); // Standard 50hz servo
servoLeft.setPeriodHertz(cfg.getInt(PKEYS::KPHERTZ, 50)); // Standard 50hz servo
servoRight.setPeriodHertz(cfg.getInt(PKEYS::KPHERTZ, 50)); // Standard 50hz servo

attachServoLeft();
attachServoRight();
11 changes: 11 additions & 0 deletions examples/lib/preferences/preferences-keys.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#define CONFIG_KEYS_LIST \
X(KLPAN, "lSpan", INT) \
X(KLOFST, "lOffset", INT) \
X(KLCENT, "lCenter", INT) \
X(KRPAN, "rSpan", INT) \
X(KROFST, "rOffset", INT) \
X(KRCENT, "rCenter", INT) \
X(KDBAND, "deathBand", INT) \
X(KPHERTZ, "periodHertz", INT) \
X(KDEBUG, "debug", BOOL) \
X(KCOUNT, "KCOUNT", UNKNOWN)
2 changes: 1 addition & 1 deletion examples/tft-3.5-basic-receiver/tft-3.5-basic-receiver.ino
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ void setup() {

if (radio.init()) {
tft.setTextSize(2);
tft.drawString("ESPNow Iniciado Correctamente", dw / 6, dh / 2);
tft.drawString("ESPNow Init success", dw / 6, dh / 2);
}
delay(1000);
}
59 changes: 59 additions & 0 deletions examples/tft-il9485-basic-receiver/lgfx_custom_ili9341_conf.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#ifndef LGFX_CUSTOMBOARD_CONF_HPP
#define LGFX_CUSTOMBOARD_CONF_HPP

#define LGFX_USE_V1

#include "LovyanGFX.hpp"

class LGFX : public lgfx::LGFX_Device
{
lgfx::Panel_ILI9341 _panel_instance;
lgfx::Bus_SPI _bus_instance;

public:
LGFX(void)
{
{
auto cfg = _bus_instance.config();
cfg.spi_host = VSPI_HOST;
cfg.spi_mode = 0;
cfg.freq_write = 27000000;
cfg.freq_read = 10000000;
cfg.spi_3wire = true;
cfg.use_lock = false;
//cfg.dma_channel = SPI_DMA_CH_AUTO;
cfg.pin_sclk = 18;
cfg.pin_mosi = 23;
cfg.pin_miso = 19;
cfg.pin_dc = 27;
_bus_instance.config(cfg);
_panel_instance.setBus(&_bus_instance);
}

{
auto cfg = _panel_instance.config();
cfg.pin_cs = 14;
cfg.pin_rst = 33;
cfg.pin_busy = -1;
cfg.panel_width = 320;
cfg.panel_height = 240;
cfg.memory_width = 320;
cfg.memory_height = 240;
cfg.offset_x = 0;
cfg.offset_y = 0;
cfg.offset_rotation = 3;
cfg.dummy_read_pixel = 8;
cfg.dummy_read_bits = 1;
cfg.readable = true;
cfg.invert = true;
cfg.rgb_order = false;
cfg.dlen_16bit = false;
cfg.bus_shared = true;
_panel_instance.config(cfg);
}

setPanel(&_panel_instance);
}
};

#endif
55 changes: 55 additions & 0 deletions examples/tft-il9485-basic-receiver/tft-il9485-basic-receiver.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* Sample shared by @turmandreams
* Board: M5Stack Basic Core
*/

#include <Arduino.h>
#include <ESPNowCam.h>
#include "lgfx_custom_ili9341_conf.hpp"
#include <LGFX_TFT_eSPI.hpp>
// #include <Utils.h>

ESPNowCam radio;

static TFT_eSPI lcd; // Instance of LGFX
static TFT_eSprite sprite(&lcd); // Instance of LGFX_Sprite when using sprites

// frame buffer
uint8_t fb[60000];
// display globals
int32_t dw = 320;
int32_t dh = 240;

void onDataReady(uint32_t lenght) {
lcd.drawJpg(fb, lenght, 0, 0, dw, dh);
// printFPS("MF:");
}

void setup(void) {
Serial.begin(115200);

pinMode(32, OUTPUT); // Back Light
digitalWrite(32, HIGH);

lcd.init();
lcd.setRotation(1);
lcd.setBrightness(128);
lcd.setColorDepth(16);

lcd.drawRect(0, 0, 320, 240, (uint16_t)0x1F); // green
delay(1000);

lcd.drawRect(0, 0, 320, 240, (uint16_t)0xF1); // green
delay(1000);

radio.setRecvBuffer(fb);
radio.setRecvCallback(onDataReady);

if (radio.init()) {
lcd.drawString("ESPNow Init Success", dw / 2, dh / 2);
Serial.println("ESPNow Init Success");
}
delay(500);
}

void loop(void) {}
110 changes: 110 additions & 0 deletions examples/tft-rgb-hmi-basic-receiver/LGFX_ESP32S3_RGB_ESP32-8048S043.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@

#define LGFX_USE_V1
#include <LovyanGFX.hpp>

#include <lgfx/v1/platforms/esp32s3/Panel_RGB.hpp>
#include <lgfx/v1/platforms/esp32s3/Bus_RGB.hpp>

#include <driver/i2c.h>

class LGFX : public lgfx::LGFX_Device
{
public:

lgfx::Bus_RGB _bus_instance;
lgfx::Panel_RGB _panel_instance;
lgfx::Light_PWM _light_instance;
lgfx::Touch_GT911 _touch_instance;

LGFX(void)
{
{
auto cfg = _panel_instance.config();

cfg.memory_width = 800;
cfg.memory_height = 480;
cfg.panel_width = 800;
cfg.panel_height = 480;

cfg.offset_x = 0;
cfg.offset_y = 0;

_panel_instance.config(cfg);
}

{
auto cfg = _panel_instance.config_detail();

cfg.use_psram = 1;

_panel_instance.config_detail(cfg);
}

{
auto cfg = _bus_instance.config();
cfg.panel = &_panel_instance;
cfg.pin_d0 = GPIO_NUM_8; // B0
cfg.pin_d1 = GPIO_NUM_3; // B1
cfg.pin_d2 = GPIO_NUM_46; // B2
cfg.pin_d3 = GPIO_NUM_9; // B3
cfg.pin_d4 = GPIO_NUM_1; // B4
cfg.pin_d5 = GPIO_NUM_5; // G0
cfg.pin_d6 = GPIO_NUM_6; // G1
cfg.pin_d7 = GPIO_NUM_7; // G2
cfg.pin_d8 = GPIO_NUM_15; // G3
cfg.pin_d9 = GPIO_NUM_16; // G4
cfg.pin_d10 = GPIO_NUM_4; // G5
cfg.pin_d11 = GPIO_NUM_45; // R0
cfg.pin_d12 = GPIO_NUM_48; // R1
cfg.pin_d13 = GPIO_NUM_47; // R2
cfg.pin_d14 = GPIO_NUM_21; // R3
cfg.pin_d15 = GPIO_NUM_14; // R4

cfg.pin_henable = GPIO_NUM_40;
cfg.pin_vsync = GPIO_NUM_41;
cfg.pin_hsync = GPIO_NUM_39;
cfg.pin_pclk = GPIO_NUM_42;
cfg.freq_write = 14000000;

cfg.hsync_polarity = 0;
cfg.hsync_front_porch = 8;
cfg.hsync_pulse_width = 4;
cfg.hsync_back_porch = 16;
cfg.vsync_polarity = 0;
cfg.vsync_front_porch = 4;
cfg.vsync_pulse_width = 4;
cfg.vsync_back_porch = 4;
cfg.pclk_idle_high = 1;
_bus_instance.config(cfg);
}
_panel_instance.setBus(&_bus_instance);

{
auto cfg = _light_instance.config();
cfg.pin_bl = GPIO_NUM_2;
_light_instance.config(cfg);
}
_panel_instance.light(&_light_instance);

{
auto cfg = _touch_instance.config();
cfg.x_min = 0;
cfg.x_max = 800;
cfg.y_min = 0;
cfg.y_max = 480;
cfg.pin_int = GPIO_NUM_18;
cfg.bus_shared = false;
cfg.offset_rotation = 0;
// I2C接続
cfg.i2c_port = I2C_NUM_1;
cfg.pin_sda = GPIO_NUM_19;
cfg.pin_scl = GPIO_NUM_20;
cfg.freq = 400000;
cfg.i2c_addr = 0x14; // 0x5D , 0x14
_touch_instance.config(cfg);
_panel_instance.setTouch(&_touch_instance);
}

setPanel(&_panel_instance);
}
};
57 changes: 57 additions & 0 deletions examples/tft-rgb-hmi-basic-receiver/tft-rgb-hmi-basic-receiver.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* Sample shared by @MeloCuentan
* Board:
* https://www.aliexpress.com/item/1005006625303218.html
*/

#include <Arduino.h>
#include <HardwareSerial.h>

#include "LGFX_ESP32S3_RGB_ESP32-8048S043.h"
#include <LGFX_TFT_eSPI.hpp>

#include "ESPNowCam.h"

static LGFX tft;

ESPNowCam radio;

// frame buffer
uint8_t *fb;

// display globals
int32_t dw = 800;
int32_t dh = 480;

void onDataReady(uint32_t lenght) { tft.drawJpg(fb, lenght, 0, 0, dw, dh); }

void setup(void) {
tft.init();
tft.setRotation(0);

pinMode(2, OUTPUT); // Display brightness enable
analogWriteResolution(8); // PWM resolution
analogWriteFrequency(1000); // PWM frequency
analogWrite(2, 127); // Brightness set

tft.setTextColor(TFT_WHITE);

// BE CAREFUL WITH IT, IF JPG LEVEL CHANGES, INCREASE IT
fb = (uint8_t *)malloc(30000 * sizeof(uint8_t));

radio.setRecvBuffer(fb);
radio.setRecvCallback(onDataReady);

if (radio.init()) {
String text = "ESPNow Init Success";
uint8_t textLenght = text.length();
uint8_t textSize = 4;
uint16_t posX = (800 - (textSize * 6 * textLenght)) / 2;
uint16_t posY = ((480 - (textSize * 8)) / 3) * 2;
tft.setTextSize(textSize);
tft.drawString(text, posX, posY);
}
delay(500);
}

void loop(void) {}
4 changes: 2 additions & 2 deletions examples/tjournal-espnow-sender/tjournal-espnow-sender.cpp
Original file line number Diff line number Diff line change
@@ -33,8 +33,8 @@ void setup() {
}

// Makerfabs receiver 7C:DF:A1:F3:73:3C
uint8_t macRecv[6] = {0x7C,0xDF,0xA1,0xF3,0x73,0x3C};
radio.setTarget(macRecv);
// uint8_t macRecv[6] = {0x7C,0xDF,0xA1,0xF3,0x73,0x3C};
// radio.setTarget(macRecv);
radio.init();

// You are able to change the Camera config E.g:
1 change: 1 addition & 0 deletions examples/unitcams3-basic-sender/unitcams3-basic-sender.cpp
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@ void setup() {
}

radio.init();

if (!Camera.begin()) {
Serial.println("Camera Init Fail");
delay(1000);
2 changes: 1 addition & 1 deletion examples/xiao-fpv-sender/xiao-fpv-sender.cpp
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ void setup() {
size_t psram_size = esp_spiram_get_size() / 1048576;
Serial.printf("PSRAM size: %dMb\r\n", psram_size);
}

// M5Core2 receiver B8:F0:09:C6:0E:CC
// uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
// radio.setTarget(macRecv);
Original file line number Diff line number Diff line change
@@ -46,16 +46,18 @@ void shutdown() {
void setup() {
Serial.begin(115200);

delay(1000); // only for debugging
// delay(4000); // only for debugging

if (psramFound()) {
size_t psram_size = esp_spiram_get_size() / 1048576;
Serial.printf("PSRAM size: %dMb\r\n", psram_size);
}

// Makerfabs receiver 7C:DF:A1:F3:73:3C
uint8_t macRecv[6] = {0x7C, 0xDF, 0xA1, 0xF3, 0x73, 0x3C};
radio.setTarget(macRecv);
// uint8_t macRecv[6] = {0x7C, 0xDF, 0xA1, 0xF3, 0x73, 0x3C};
// M5Core2 receiver B8:F0:09:C6:0E:CC
// uint8_t macRecv[6] = {0xB8,0xF0,0x09,0xC6,0x0E,0xCC};
// radio.setTarget(macRecv);
radio.init();

// Configuration without using the PSRAM, only DRAM. (more faster)
3 changes: 2 additions & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "EspNowCam",
"version": "0.1.13",
"version": "0.1.14",
"homepage":"https://github.com/hpsaturn/esp32s3-cam",
"keywords":
[
@@ -18,6 +18,7 @@
"Freenove",
"M5CoreS3",
"M5Core2",
"M5Core",
"Nanopb"
],
"description":"ESPNowCam, a straightforward video streamer for popular ESP32Cam models, leveraging the ESPNow protocol. No need for IPs, routers, or credentials—keeping it simple! :D ESPNowCam supports ESP32 Cameras and displays. **This library is for general purpose**, as it receives pointers to data, such as buffers, strings, images, or any byte-formatted content. This versatility allows you to transmit larger packages.",
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=EspNowCam
version=0.1.13
version=0.1.14
author=@hpsaturn
maintainer=Antonio Vanegas <hpsaturn@gmail.com>
sentence=ESPNowCam, a straightforward video streamer for popular ESP32Cam models, leveraging the ESPNow protocol. No need for IPs, routers, or credentials—keeping it simple! :D
18 changes: 17 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

[platformio]
src_dir = ./examples/
lib_dir = ./examples/espcamlib
lib_dir = ./examples/lib

[env]
platform = espressif32@6.6.0
@@ -135,6 +135,21 @@ lib_deps =
${esp32common.lib_deps}
lovyan03/LovyanGFX@^1.1.5

[env:tft-rgb-hmi-basic-receiver]
extends = esp32common
build_src_filter = -<*> +<tft-rgb-hmi-basic-receiver/tft-rgb-hmi-basic-receiver.cpp>
lib_deps =
${esp32common.lib_deps}
lovyan03/LovyanGFX@^1.1.5

[env:tft-il9485-basic-receiver]
extends = esp32common
board = esp32dev
build_src_filter = -<*> +<tft-il9485-basic-receiver/tft-il9485-basic-receiver.cpp>
lib_deps =
${esp32common.lib_deps}
lovyan03/LovyanGFX@^1.1.5

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; N:1 EXAMPLES
; Multi camera to one receiver examples.
@@ -184,6 +199,7 @@ build_src_filter = -<*> +<common/> +<freenove-tank/>
lib_deps =
${esp32common.lib_deps}
madhephaestus/ESP32Servo@1.1.2
https://github.com/hpsaturn/easy-preferences.git
https://github.com/hpsaturn/SerialTerminal.git
hpsaturn/ESP32 Wifi CLI @^0.2.1

6 changes: 3 additions & 3 deletions prebuild.py
Original file line number Diff line number Diff line change
@@ -4,9 +4,9 @@
import os.path
import shutil

example_lib_dir = "examples/espcamlib"
dst = "examples/espcamlib/src"
src = "../../src"
example_lib_dir = "examples/lib/espcamlib"
dst = "examples/lib/espcamlib/src"
src = "../../../src"
lib = "src"

os.makedirs(example_lib_dir, 0o755, True)
4 changes: 2 additions & 2 deletions src/ESPNowCam.h
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@ extern "C" {
typedef void (*RecvCb)(uint32_t lenght);
}

#define CSL_VERSION "0.1.13"
#define CSL_REVISION 078
#define CSL_VERSION "0.1.14"
#define CSL_REVISION 079

class ESPNowCam {
private:
3 changes: 2 additions & 1 deletion src/drivers/CamAIThinker.h
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ class CamAIThinker : public CameraBase {

CamAIThinker(){
config.pin_reset = -1;
config.pin_pwdn = 32;
config.pin_xclk = 0;
config.pin_sccb_sda = 26;
config.pin_sccb_scl = 27;
@@ -26,7 +27,7 @@ class CamAIThinker : public CameraBase {
config.pin_vsync = 25;
config.pin_href = 23;
config.pin_pclk = 22;
config.xclk_freq_hz = 20000000;
config.xclk_freq_hz = 16000000;
config.ledc_timer = LEDC_TIMER_0;
config.ledc_channel = LEDC_CHANNEL_0;
config.pixel_format = PIXFORMAT_RGB565;

0 comments on commit cd6e706

Please sign in to comment.