Skip to content

Commit

Permalink
Add arduino ide depends & links
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinyu-Zhao committed Jun 17, 2023
1 parent ec18814 commit 97cb578
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 52 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# CoreS3 Library
# M5CoreS3 Library

English | [中文](README_cn.md)

<img src="https://static-cdn.m5stack.com/resource/docs/products/core/CoreS3/img-96063e2a-637a-4d11-ac47-1ce4f1cdfd3e.webp" alt="M5Atom Lite" width="350" height="350">
<img src="https://static-cdn.m5stack.com/resource/docs/products/core/CoreS3/img-96063e2a-637a-4d11-ac47-1ce4f1cdfd3e.webp" alt="M5CoreS3" width="350" height="350">

* **For the Detailed documentation of CoreS3, please [Click here](https://docs.m5stack.com/en/core/CoreS3)**

## Depend Libraries:
- [BMI270_Sensor](https://github.com/Tinyu-Zhao/BMI270_Sensor)
- [M5GFX](https://github.com/m5stack/m5gfx)
- [M5Unified](https://github.com/m5stack/M5unified)

## Description

`CoreS3` is the third generation of the M5Stack development kit series, its core master adopts the `ESP32-S3` solution, `dual-core Xtensa LX7` processor, the main frequency is`240MHz`, comes with '`WiFi`function, and the onboard `16MFLASH`and `8M-PSRAM`; It can `download the program`through the `TYPE-C` interface, support `OTG and CDC`functions, and facilitate external USB devices and flashing firmware; The front is equipped with a `2.0-inch capacitive touch IPS screen`, and the panel is made of `high-strength glass material`; A `30w pixel camera GC0308` is built into the bottom of the screen, with `proximity sensor LTR-553ALS-WA`; The power supply part adopts `AXP2101 power management core`chip and `4-way power flow control loop`, and the overall adopts `low power consumption` design; On-board `6-axis attitude sensor BMI270 and magnetometer BMM150`; On-board `TF-card (microSD)` card slot; On-board BM8563 `RTC` chip, providing accurate timing and `sleep-timer wake-up` function; In terms of sound output, it adopts high-fidelity `16bits-I2S` power amplifier chip AW88298, and the fuselage has a built-in `1w speaker`; In terms of sound input, ES7210 `audio decoding chip + dual microphone input` is adopted; On the side of the fuselage, there is a `independent power button and restart (RST) button`, self-built delay circuit, `long press the reset button to enter the program download mode`. The CoreS3 set comes with a `DinBase Base` by default, which is convenient for `Din rail, wall and screw fixing`; It can be powered by external `DC 12V (support 9~24V)` or internal `500mAh lithium battery`; DinBase reserves multiple `proto` locations for users to `DIY`. This finished product is suitable for scenarios such as `Internet of Things development, various DIY project development, smart home control system and industrial automation control system`.
Expand Down Expand Up @@ -38,7 +43,7 @@ English | [中文](README_cn.md)

- [Complete schematic pdf](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/K128%20CoreS3/Sch_M5_CoreS3_v1.0.pdf)

<!--

## More Information

**Arduino IDE Development**: [Click Here](https://docs.m5stack.com/en/quick_start/atoms3/arduino) -->
**Arduino IDE Development**: [Click Here](https://docs.m5stack.com/en/quick_start/cores3/arduino)
11 changes: 8 additions & 3 deletions README_cn.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# CoreS3 Library
# M5CoreS3 Library

中文 | [English](README_cn.md)

<img src="https://static-cdn.m5stack.com/resource/docs/products/core/CoreS3/img-96063e2a-637a-4d11-ac47-1ce4f1cdfd3e.webp" width="350" height="350">

* **如果查看 CoreS3 的详细介绍文档,[点击这里](https://docs.m5stack.com/zh_CN/core/CoreS3)**

## 依赖库:
- [BMI270_Sensor](https://github.com/Tinyu-Zhao/BMI270_Sensor)
- [M5GFX](https://github.com/m5stack/m5gfx)
- [M5Unified](https://github.com/m5stack/M5unified)

## 描述

`CoreS3`是M5Stack开发套件系列的第三代主机,其核心主控采用`ESP32-S3`方案,`双核Xtensa LX7`处理器,主频`240MHz`,自带`WiFi`功能,板载`16MFLASH`和`8M-PSRAM`;可通过`TYPE-C`接口`下载程序`,支持`OTG和CDC`功能,方便外接usb设备和烧录固件;正面搭载一块`2.0寸电容触摸IPS屏`,面板采用`高强度玻璃材质`;屏幕下方内置一个`30w像素的摄像头GC0308`,附带`接近传感器LTR-553ALS-WA`;电源部分采用`AXP2101电源管理芯`片及`4路电源流向控制回路`,整体采用`低功耗`设计;板载`六轴姿态传感器BMI270和磁力计BMM150`;板载`TF-card(microSD)`卡槽;板载BM8563 `RTC`芯片,提供精确计时及`休眠-定时唤醒`功能;声音输出方面采用高保真`16bits-I2S`功放芯片AW88298,机身内置`1w扬声器`;声音输入方面采用ES7210`音频解码芯片+双麦克风输入`;在机身侧边配有`独立电源按键与重启(RST)按键`,自建延时电路,`长按复位键便可进入程序下载模式`。CoreS3套装默认附带`DinBase底座`,方便实现`Din导轨、挂墙以及螺丝固定`;可外部`DC 12V(支持9~24V)`或者内部`500mAh锂电池`供电;DinBase预留多处`proto`的位置,方便用户`DIY`。本成品适用于`物联网开发、各种DIY项目开发、智能家居控制系统和工业自动化控制系统`等场景。
Expand Down Expand Up @@ -34,6 +39,6 @@

- [完整原理图pdf](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/K128%20CoreS3/Sch_M5_CoreS3_v1.0.pdf)

<!-- ## 更多信息
## 更多信息

**Arduino IDE 环境搭建**: [点击这里](https://docs.m5stack.com/zh_CN/quick_start/atoms3/arduino) -->
**Arduino IDE 环境搭建**: [点击这里](https://docs.m5stack.com/zh_CN/quick_start/cores3/arduino)
92 changes: 51 additions & 41 deletions examples/Basics/Camera/Camera.ino
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
/*
*******************************************************************************
* Copyright (c) 2023 by M5Stack
* Equipped with M5CoreS3 sample source code
* 配套 M5CoreS3 示例源代码
* Visit for more information: https://docs.m5stack.com/en/core/CoreS3
* 获取更多资料请访问: https://docs.m5stack.com/zh_CN/core/CoreS3
*
* Describe: Camera example.
* Date: 2023/6/17
*******************************************************************************
*/
#include <M5CoreS3.h>
#include "esp_camera.h"
#include <WiFi.h>
#include <M5Unified.h>
#include "CoreS3_GC0308.hpp"

#define PWDN_GPIO_NUM -1
// Configure the name and password of the connected wifi.
// 配置所连接wifi的名称、密码
const char* ssid = "**********";
const char* password = "**********";

#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM -1
#define SIOD_GPIO_NUM -1
#define SIOC_GPIO_NUM -1
#define XCLK_GPIO_NUM -1
#define SIOD_GPIO_NUM -1
#define SIOC_GPIO_NUM -1

#define Y2_GPIO_NUM 39
#define Y3_GPIO_NUM 40
Expand All @@ -19,14 +37,8 @@
#define Y9_GPIO_NUM 47

#define VSYNC_GPIO_NUM 46
#define HREF_GPIO_NUM 38
#define PCLK_GPIO_NUM 45

// ===========================
// Enter your WiFi credentials
// ===========================
const char* ssid = "**********";
const char* password = "**********";
#define HREF_GPIO_NUM 38
#define PCLK_GPIO_NUM 45

void startCameraServer();

Expand All @@ -37,42 +49,40 @@ void setup() {
Serial.println();

camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sccb_sda = SIOD_GPIO_NUM;
config.pin_sccb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.frame_size = FRAMESIZE_QVGA;
config.pixel_format = PIXFORMAT_RGB565;
config.grab_mode = CAMERA_GRAB_WHEN_EMPTY;
config.fb_location = CAMERA_FB_IN_PSRAM;
config.jpeg_quality = 0;
config.fb_count = 2;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sccb_sda = SIOD_GPIO_NUM;
config.pin_sccb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.frame_size = FRAMESIZE_QVGA;
config.pixel_format = PIXFORMAT_RGB565;
config.grab_mode = CAMERA_GRAB_WHEN_EMPTY;
config.fb_location = CAMERA_FB_IN_PSRAM;
config.jpeg_quality = 0;
config.fb_count = 2;
config.sccb_i2c_port = M5.In_I2C.getPort();



// camera init
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
Serial.printf("Camera init failed with error 0x%x", err);
return;
}
if(!cam::GC0308::complementDriver())
{
if (!cam::GC0308::complementDriver()) {
M5_LOGE("Failed to complement GC0308");
}

Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type": "git",
"url": "https://github.com/m5stack/M5CoreS3.git"
},
"version": "0.0.2",
"version": "0.0.3",
"frameworks": "arduino",
"platforms": "espressif32",
"headers": "M5CoreS3.h"
Expand Down
4 changes: 2 additions & 2 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=M5CoreS3
version=0.0.2
version=0.0.3
author=M5Stack
maintainer=M5Stack
sentence=Library for M5CoreS3 Core development kit
Expand All @@ -8,4 +8,4 @@ category=Device Control
url=https://github.com/m5stack/M5CoreS3
architectures=esp32
includes=M5CoreS3.h
depends=M5Family
depends=M5Family,BMI270_Sensor,M5GFX,M5Unified
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:esp32-s3-devkitc-1]
[env:M5CoreS3]
platform = espressif32
board = esp32-s3-devkitc-1
framework = arduino
Expand Down

0 comments on commit 97cb578

Please sign in to comment.