diff --git a/docs/assets/img/product_pics/atom_base/atomic/atomic_01.webp b/docs/assets/img/product_pics/atom_base/atomic/atomic_01.webp index c4fe30cc..0734076d 100644 Binary files a/docs/assets/img/product_pics/atom_base/atomic/atomic_01.webp and b/docs/assets/img/product_pics/atom_base/atomic/atomic_01.webp differ diff --git a/docs/assets/img/product_pics/base/w5500PoE/w5500PoE.webp b/docs/assets/img/product_pics/base/w5500PoE/w5500PoE.webp new file mode 100644 index 00000000..58f83af7 Binary files /dev/null and b/docs/assets/img/product_pics/base/w5500PoE/w5500PoE.webp differ diff --git a/docs/assets/img/product_pics/base/w5500PoE/w5500PoE_01.webp b/docs/assets/img/product_pics/base/w5500PoE/w5500PoE_01.webp new file mode 100644 index 00000000..679f9a9f Binary files /dev/null and b/docs/assets/img/product_pics/base/w5500PoE/w5500PoE_01.webp differ diff --git a/docs/assets/img/product_pics/base/w5500PoE/w5500PoE_04.webp b/docs/assets/img/product_pics/base/w5500PoE/w5500PoE_04.webp new file mode 100644 index 00000000..9aeb10c9 Binary files /dev/null and b/docs/assets/img/product_pics/base/w5500PoE/w5500PoE_04.webp differ diff --git a/docs/assets/img/product_pics/unit/m5camera_F_new/unit_m5camera_f_new_01.jpg b/docs/assets/img/product_pics/unit/m5camera_F_new/unit_m5camera_f_new_01.jpg new file mode 100644 index 00000000..f5f02302 Binary files /dev/null and b/docs/assets/img/product_pics/unit/m5camera_F_new/unit_m5camera_f_new_01.jpg differ diff --git a/docs/assets/img/related_documents/Arduino_IDE/Arduino_11.webp b/docs/assets/img/related_documents/Arduino_IDE/Arduino_11.webp new file mode 100644 index 00000000..edbfa9dc Binary files /dev/null and b/docs/assets/img/related_documents/Arduino_IDE/Arduino_11.webp differ diff --git a/docs/en/api/imu.md b/docs/en/api/imu.md new file mode 100644 index 00000000..a26a377a --- /dev/null +++ b/docs/en/api/imu.md @@ -0,0 +1,127 @@ +# IMU + +*IMU automatically call different IMU models according to different configurations* + +## Init() + +**Syntax:** + +int Init(void); + +**Description:initialize IMU** + +**Example:** +```arduino +#include + +void setup() { + M5.begin(); + int x = M5.IMU.Init(); //return 0 is ok, return -1 is unknow + Serial.println(x); +} +void loop() {} +``` + +## getGyroData() + +**Syntax:** + +void getGyroData(float *gx, float *gy, float *gz); + +**Description:Obtain the three-axis gyroscope data of the IMU chip.** + +**Example:** +```arduino +#include + +float gyroX, gyroY, gyroZ; + +void setup() { + M5.begin(); + M5.IMU.Init(); +} +void loop() { + M5.IMU.getGyroData(&gyroX, &gyroY, &gyroZ); + M5.Lcd.setCursor(0, 30); + M5.Lcd.printf("X:%7.2f\nY:%7.2f\nZ:%7.2f ", gyroX, gyroY, gyroZ); + delay(500); +} +``` + +## getAccelData() + +**Syntax:** + +void getAccelData(float *ax, float *ay, float *az); + +**Description:Obtain the three-axis accelerometer data of the IMU chip.** + +**Example:** +```arduino +#include + +float accX, accY, accZ; + +void setup() { + M5.begin(); + M5.IMU.Init(); +} +void loop() { + M5.IMU.getAccelData(&accX, &accY, &accZ); + M5.Lcd.setCursor(0, 45); + M5.Lcd.printf("X:%5.2f\nY:%5.2f\nZ:%5.2f ", accX, accY, accZ); + delay(500); +} +``` + +## getAhrsData() + +**Syntax:** + +void getAhrsData(float *pitch, float *roll, float *yaw); + +**Description:Get the attitude of the IMU chip.** + +**Example:** +```arduino +#include + +float pitch, roll, yaw; + +void setup() { + M5.begin(); + M5.IMU.Init(); +} +void loop() { + M5.IMU.getAhrsData(&pitch, &roll, &yaw); + M5.Lcd.setCursor(0, 45); + M5.Lcd.printf("X:%5.2f\nY:%5.2f\nZ:%5.2f ", pitch, roll, yaw); + delay(500); +} +``` + +## getTempData() + +**Syntax:** + +void getTempData(float *t); + +**Description:Get the temperature of the IMU chip.** + +**Example:** +```arduino +#include + +float temp; + +void setup() { + M5.begin(); + M5.IMU.Init(); +} +void loop() { + M5.IMU.getTempData(&temp); + M5.Lcd.setCursor(0, 45); + M5.Lcd.printf("Temperature : %.2f C", temp); + delay(500); +} +``` \ No newline at end of file diff --git a/docs/en/api/pwm.md b/docs/en/api/pwm.md new file mode 100644 index 00000000..88b090ef --- /dev/null +++ b/docs/en/api/pwm.md @@ -0,0 +1,48 @@ +# PWM + +*PWM used to generate analog signals to drive servos or buzzers,etc.* + +## ledcSetup() + +**Syntax:** + +void ledcSetup(uint8_t channel, double freq, uint8_t resolution_bits); + +**Description:Set the PWM channel, frequency and resolution.** + +## ledcAttachPin() + +**Syntax:** + +void ledcAttachPin(uint8_t pin, uint8_t channel); + +**Description:Bind the LEDC channel to the specified IO port to achieve output.** + +## ledWrite() + +**Syntax:** + +void ledcWrite(uint8_t channel, uint32_t duty); + +**Description:Output waveform to the channel channel according to the specified duty cycle.** + +**Example:** +```arduino +#include +int freq = 1800; +int channel = 0; +int resolution_bits = 8; +int buzzer = 2; + +void setup() { + M5.begin(); + ledcSetup(channel, freq, resolution_bits); + ledcAttachPin(buzzer, channel); +} +void loop() { + ledcWrite(channel, 128); + delay(1000); + ledcWrite(channel, 0); + delay(1000); +} +``` \ No newline at end of file diff --git a/docs/en/arduino/arduino_api.md b/docs/en/arduino/arduino_api.md index fe492b52..21820995 100644 --- a/docs/en/arduino/arduino_api.md +++ b/docs/en/arduino/arduino_api.md @@ -17,5 +17,5 @@ ||| |:---:|:---:| |**[System](en/api/system_m5stickc)** | **[Power Management(AXP192)](en/api/axp192_m5stickc)** | -|**[TFT Screen](en/api/lcd_m5stickc)** | **[IMU(SH200Q)](en/api/sh200q_m5stickc)** | -|**[RTC](en/api/rtc)**| +|**[TFT Screen](en/api/lcd_m5stickc)** | **[IMU](en/api/imu)** | +|**[RTC](en/api/rtc)**| | **[PWM](en/api/pwm)** | diff --git a/docs/en/atom/atomic.md b/docs/en/atom/atomic.md index e9ba9dd9..cad41e3f 100644 --- a/docs/en/atom/atomic.md +++ b/docs/en/atom/atomic.md @@ -21,8 +21,8 @@ - 1x Proto Board - 1x Proto Board(soldered pin/finished product) - 1x 4P VH-3.96 Plug + Plug Base -- 1x 4P 2.0 Pins -- 1x 5P 2.0 Pins +- 1x 4P 2.54 Pins +- 1x 5P 2.54 Pins - 1x ATOMIC Case - 1x M2*3mm Hexagon self tapping screw - 1x M2*8mm Hexagon socket cup head machine screw @@ -45,11 +45,10 @@ - + External port VH-3.96 4P - - + net weight 5g @@ -59,7 +58,7 @@ Product Size - 24*24*17mm + 24*24*18mm Package Size @@ -67,7 +66,7 @@ Case material - Plastic ( PC ) + Plastic (PC) diff --git a/docs/en/base/w5500PoE.md b/docs/en/base/w5500PoE.md new file mode 100644 index 00000000..257d15d8 --- /dev/null +++ b/docs/en/base/w5500PoE.md @@ -0,0 +1,186 @@ +# Base PoE + +
SKU:K012-C
+ +
+ +## Description + +**Base PoE** is an M5 Base that implements a W5500 Ethernet controller chip with PoE module, which provides Hardwired TCP/IP embedded Ethernet control to facilitate easier internet connection to embedded systems. W5500 integrates TCP/IP protocol stack, 10/100M Ethernet data link layer (MAC) and physical layer (PHY).This base supports RS485 / RS232 communication and can be used as an Ethernet to serial port server. It is specifically designed for industrial applications. PoE (Power over Ethernet) technology is supported. Through the built-in PoE module, power can be directly supplied to the base through PoE hub / switch without a separate power supply. It comes with a couple of HT3.96 connectors, metal rail and magnet discs for easy installation. The 6 pins of the HT3.96 connector are spare, you can wire them up with an RS485 or RS232 adapter board as you like. + +**The figure below shows the internals of the LAN base** + +If you need to add an RS485 or RS232 interface, make sure to solder the RS485 or RS232 board onto the main board pin correspondingly. + + + +### Product Features + +- Support PoE IEEE802.3 AF/AT +- DC input supply voltage: 9-24V +- Ethernet access +- HT3.96 port for supporting RS485/RS232 communication +- 8 independent hardware socket simultaneous communication +- Support TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE protocols +- Support integrated 10BaseT / 100Base-T Ethernet PHY +- Easy to fixed on the wall + + +## Applications + +- Ethernet controller +- Ethernet and RS485/RS232 data forwarding +- Ethernet network node + + +## Include + +- 1x PoE Base +- 1x TTL-to-RS485 adapter board +- 1x TTL-to-RS232 adapter board +- 1x pin header 20pin +- 1x metal rails and magnet discs +- 3x HT3.96 terminal + - 2x 3pin + - 1x 4pin +- 10x cold crimp terminal(red Copper Lugs) +- 3x Allen wrench +  - 1x 1.5mm +  - 1x 2mm +  - 1x 2.5mm +- 2x hexagon socket head cap screws M3x28 +- 4x hexagon socket tapping screw KA2x4 +- 1x countersunk head screw M3x8 + +## Specification + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ResourcesParameter
Ethernet chipW5500
Support protocolsTCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE
RS485 chipSP3485EE
RS232 chipMAX232
PoE power supply modeIdle network cable pin power supply(10M/100M Ethernet),J4&J5(VC-),J7&J8(VC+)
PoE specificationIEEE802.3 AF/AT
DC input voltage9V~24V
Net weight32g
Gross weight132g
Product size54*54*28mm
Package Size105*65*4mm
+ +## EasyLoader + +>EasyLoader is a concise and fast program writer, which has a built-in case program related to the product. It can be burned to the main control by simple steps to perform a series of function verification. Please install the corresponding driver according to the device type. M5Core host [Please click here to view the CP210X driver installation tutorial](en/arduino/arduino_development), M5StickC/V/T/ATOM series can be used without driver) + +
+
+
+
+ Windows + MacOS +
+
+
+ +
+ + +

Description:

+

Send messages or commands via Ethernet to control M5Stack 6060 PUSH or display messages on the screen

+
+
+
+ + + +### PinMap + + + + + + + + + + + + + + + + + + + + + + + + + + +
M5StackGPIO13GPIO18GPIO19GPIO23GPIO26GPIO34GPIO5GPIO15
W5500 PoERSTCLKMISOMOSICSINTRX/ATX/B
+ +## Schematic + + + +## Related Link + +- **Datasheet** + - [W5500](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/base/W5500_datasheet_v1.0.2_1_en.pdf) + - [SP485EEN](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/hat/SP485EEN_en.pdf) + - [MAX232](hhttps://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/atombase/AtomicRS232/MAX232.pdf) + +## Example + +- Get Arduino code [click here](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Base/W5500_PoE) + + \ No newline at end of file diff --git a/docs/en/core/m5stickc_plus.md b/docs/en/core/m5stickc_plus.md index 93fe0b16..de0f8cc8 100644 --- a/docs/en/core/m5stickc_plus.md +++ b/docs/en/core/m5stickc_plus.md @@ -72,7 +72,7 @@ LCD screen - 1.14 inch, 135*240 Colorful TFT LCD, ST7789 + 1.14 inch, 135*240 Colorful TFT LCD, ST7789v2 Button @@ -184,18 +184,19 @@ Power structure block diagram **RED LED & IR Transmitter & BUTTON A & BUTTON B** - + +
ESP32 GPIO10GPIO9GPIO37GPIO39
ESP32 GPIO10GPIO9GPIO37GPIO39GPIO2
RED LEDLED Pin
IR Transmitter Transmitter Pin
BUTTON A Button Pin
BUTTON B Button Pin
Buzzer Buzzer Pin
**TFT LCD** -Driver IC:ST7735S +Driver IC:ST7789v2 -Resolution:80 * 160 +Resolution:135 * 240 diff --git a/docs/en/unit/m5camera_f_new.md b/docs/en/unit/m5camera_f_new.md new file mode 100644 index 00000000..64f4fe64 --- /dev/null +++ b/docs/en/unit/m5camera_f_new.md @@ -0,0 +1,204 @@ +# M5CameraF New + +
SKU:U037
+ +
+ +## Description + +**M5CameraF** is a development board for image recognition. It features an ESP32(4M Flash + 520K RAM) chip and 2-Megapixel carmera(OV2640).**M5CameraF** offers plenty of storage, with an extra 4 Mbyte PSRAM. It also supports image transmission via Wi-Fi and debuging through USB Type-C port. + + +The hardware comes preloaded software, programmed by ESP-IDF. It is an application to run Wi-Fi camera. The output image is size 600*800, since it's 2-Maga camera, you sure can optimize the software to output the maximum size of photos. + +what this software can do? +- Power the board via USB type-C or GROVE +- Use your phone to Wi-Fi scan an AP name start with 'm5stack-' and click to connect this AP. +- Open up web browser on your phone and visit 192.168.4.1 +- Then here comes the picture. Video is about 5-6 frames per senconds. not super fast. + +## Product Features + +- CP2104 USB-to-TTL converter +- ESP32-WROVER (PCB Antenna) +- WIFI image transmission +- OV2640 sensor +- Camera Field of View : **150 degree** + +## Include + +- 1x M5CameraF +- 1x LEGO Adapter +- 1x Wall/1515 +- 1x Type-C USB(20cm) + + + + +## Specification + +
ESP32 GPIO15GPIO13GPIO23GPIO18GPIO5
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ResourcesParameter
Flash4M
RAM4MB
Image SensorOV2640
Maximum resolution200w pixel
Output formatYUV(422/420)/YCbCr422,RGB565/555,8-bit compressed data,8-/10-bit Raw RGB data
Maximum image transmission rateUXGA/SXGA: 15fps, SVGA: 30fps, CIF: 60fps
FOV150°
CCD Size1/4 inch
net weight17g
Gross weight41g
Product Size24*48*19mm
Package Size75*45*30mm
+ +## EasyLoader + + + + + +>1.EasyLoader is a simple and fast program burner. Every product page in EasyLoader provides a product-related case program. It can be burned to the master through simple steps, and a series of function verification can be performed. . + +>2. After downloading the software, double-click to run the application, connect the M5 device to the computer through the data cable, select the port parameters, click **"Burn"** to start burning. (**For M5StickC burning, please Set the baud rate to 750000 or 115200**) + +?>3. Currently EasyLoader is only suitable for Windows operating system, compatible with M5 system adopts ESP32 as the control core host. Before installing for M5Core, you need to install CP210X driver (you do not need to install with M5StickC as controller)[Click here to view the driver installation tutorial](en/related_documents/M5Burner#install-usb-driver) + +## PinMap + +**Camera Interface PinMap** + +| *Interface* | *Camera Pin*| *M5CameraF* | +| :------------------- | :--------:| :------: | +| SCCB Clock | SIOC |IO23 | +| SCCB Data | SIOD |**IO22** | +| System Clock | XCLK |IO27 | +| Vertical Sync | VSYNC |**IO25** | +| Horizontal Reference | HREF |IO26 | +| Pixel Clock | PCLK |IO21 | +| Pixel Data Bit 0 | D2 |IO32 | +| Pixel Data Bit 1 | D3 |IO35 | +| Pixel Data Bit 2 | D4 |IO34 | +| Pixel Data Bit 3 | D5 |IO5 | +| Pixel Data Bit 4 | D6 |IO39 | +| Pixel Data Bit 5 | D7 |IO18 | +| Pixel Data Bit 6 | D8 |IO36 | +| Pixel Data Bit 7 | D9 |IO19 | +| Camera Reset | RESET |IO15 | +| Camera Power Down | PWDN | *see Note 1* | +| Power Supply 3.3V | 3V3 | 3V3 | +| Ground | GND | GND | + +**GROVE Interface** + +| *Grove* | *M5CameraF* | +| :-----------: | :------: | +| SCL | **IO13** | +| SDA | **IO4** | +| 5V | 5V | +| GND | GND | + +**LED Interface** + +| *LED* | *M5CameraF* | +| :-----------: | :------: | +| LED_Pin | IO14 | + +**NOTE:** + +1. **Camera Power Down** pin does not need to be connected to ESP32 GPIO. Instead it may be pulled down to ground with 10 kOhm resistor. + +2. We have several patterns of camera board, the following figures shows the main differece + + + +## Related Link + +- **Datasheet** - [ESP32](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/esp32_datasheet_en.pdf) - [OV2640](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/OV2640DS_en.pdf) + +## Example + +### Firmware + +- **[M5Camera Firmware](https://github.com/m5stack/M5Stack-Camera/tree/master/wifi/wifi_ap/firmware/M5CameraF)** + +### Code + + - **[Serial communication-M5CameraF](https://github.com/m5stack/M5Stack-Camera/tree/master/uart/firmware/M5CameraF)** + + - **[Serial communication-M5Core](https://github.com/m5stack/M5Stack-Camera/tree/master/uart/arduino)**(The serial communication routine is the communication between the camera and the M5Core.) + + - **[QRcode](https://github.com/m5stack/M5Stack-Camera/tree/master/qr/firmware/M5CameraF)** + +### Source Code + - **[M5Camera](https://github.com/m5stack/M5Stack-Camera)** + +## Schematic + +### Power circuit + + + +### Chip peripheral circuit + + + +### USB to serial port part of the circuit + + + +- **[Color recognition](https://github.com/m5stack/Applications-cam)** + +- **[Face recognition](https://github.com/m5stack/esp-who)** --> + + + \ No newline at end of file diff --git a/docs/image/Units/RGB LED.png b/docs/image/Units/RGB LED.png deleted file mode 100644 index bad60594..00000000 Binary files a/docs/image/Units/RGB LED.png and /dev/null differ diff --git a/docs/image/Units/RGB LED.webp b/docs/image/Units/RGB LED.webp new file mode 100644 index 00000000..c72c688f Binary files /dev/null and b/docs/image/Units/RGB LED.webp differ diff --git a/docs/index.md b/docs/index.md index b5d56c66..40bd36b4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -84,6 +84,7 @@ {a:"/#/en/base/base26", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/base/base_base26_01.webp", p:"BASE26", sku:"K026" ,kw:"PROTOTYPE"}, {a:"/#/en/accessory/battery_base", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/accessory/battery_base_01.webp", p:"M5CameraBattery", sku:"A068" ,kw:"BATTERY"}, {a:"/#/en/base/basex", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/base/base_basex_01.webp", p:"BaseX", sku:"K037" ,kw:"LEGO EV3 MOTOR"}, + {a:"/#/en/base/w5500PoE", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/base/w5500PoE_01.webp", p:"PoE", sku:"K012-C" ,kw:"W5500 INTERNET RS485 PoE"}, ]; const unit_list = [ @@ -93,6 +94,7 @@ {a:"#/en/unit/m5camera_f", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit_m5camera_f_01.webp", p:"M5CameraF", sku:"U037", qs:"#en/quick_start/m5camera/m5camera_quick_start" ,kw:"ESP32 CAMERA"}, {a:"/#/en/unit/m5camera_x", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit_m5camera_x_01.webp", p:"M5CameraX", sku:"U038", qs:"#en/quick_start/m5camera/m5camera_quick_start" ,kw:"ESP32 CAMERA"}, {a:"/#/en/unit/unitv", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit-v-01.webp", p:"UNIT-V", sku:"U078", qs:"#en/quick_start/unitv/unitv_quick_start" ,kw:"K210 CAMERA"}, + {a:"/#/en/unit/m5camera_f_new", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit_m5camera_f_new_01.webp", p:"M5CameraF New", sku:"U037", qs:"#en/quick_start/m5camera/m5camera_quick_start" ,kw:"ESP32 CAMERA"}, //Sensor class {a:"/#/en/unit/earth", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit_earth_01.webp", p:"EARTH", sku:"U019" ,kw:"SENSOR"}, {a:"/#/en/unit/env", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit_env_01.webp", p:"ENV", sku:"U001" ,kw:"DHT12 BMP280"}, diff --git a/docs/zh_CN/README.md b/docs/zh_CN/README.md index 2393b45d..a830aaba 100644 --- a/docs/zh_CN/README.md +++ b/docs/zh_CN/README.md @@ -86,6 +86,7 @@ {a:"/#/zh_CN/base/base26", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/base/base_base26_01.webp", p:"BASE26", sku:"K026" ,kw:"PROTOTYPE"}, {a:"/#/zh_CN/accessory/battery_base", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/accessory/battery_base_01.webp", p:"M5CameraBattery", sku:"A068" ,kw:"BATTERY"}, {a:"/#/zh_CN/base/basex", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/base/base_basex_01.webp", p:"BaseX", sku:"K037" ,kw:"LEGO EV3 MOTOR"}, + {a:"/#/zh_CN/base/w5500PoE", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/base/w5500PoE_01.webp", p:"PoE", sku:"K012-C" ,kw:"W5500 LAN PoE INTERNET RS485"}, ]; const unit_list = [ @@ -95,6 +96,7 @@ {a:"#/zh_CN/unit/m5camera_f", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit_m5camera_f_01.webp", p:"M5CameraF", sku:"U037", qs:"#zh_CN/quick_start/m5camera/m5camera_quick_start" ,kw:"ESP32 CAMERA"}, {a:"/#/zh_CN/unit/m5camera_x", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit_m5camera_x_01.webp", p:"M5CameraX", sku:"U038", qs:"#zh_CN/quick_start/m5camera/m5camera_quick_start" ,kw:"ESP32 CAMERA"}, {a:"/#/zh_CN/unit/unitv", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit-v-01.webp", p:"UNIT-V", sku:"U078", qs:"#zh_CN/quick_start/unitv/unitv_quick_start" ,kw:"K210 CAMERA"}, + {a:"/#/zh_CN/unit/m5camera_f_new", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit_m5camera_f_new_01.webp", p:"M5CameraF New", sku:"U037", qs:"#zh_CN/quick_start/m5camera/m5camera_quick_start" ,kw:"ESP32 CAMERA"}, //Sensor class {a:"/#/zh_CN/unit/earth", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit_earth_01.webp", p:"EARTH", sku:"U019" ,kw:"SENSOR"}, {a:"/#/zh_CN/unit/env", img:"https://m5stack.oss-cn-shenzhen.aliyuncs.com/image/m5-docs_homepage/unit/unit_env_01.webp", p:"ENV", sku:"U001" ,kw:"DHT12 BMP280"}, diff --git a/docs/zh_CN/api/imu.md b/docs/zh_CN/api/imu.md new file mode 100644 index 00000000..3e74d403 --- /dev/null +++ b/docs/zh_CN/api/imu.md @@ -0,0 +1,127 @@ +# IMU + +*IMU根据主机配置不同自动调用不同的IMU型号* + +## Init() + +**函数原型:** + +int Init(void); + +**功能:初始化 IMU 芯片。** + +**例程:** +```arduino +#include + +void setup() { + M5.begin(); + int x = M5.IMU.Init(); //return 0 is ok, return -1 is unknow + Serial.println(x); +} +void loop() {} +``` + +## getGyroData() + +**函数原型:** + +void getGyroData(float *gx, float *gy, float *gz); + +**功能:获取 IMU 芯片的三轴陀螺仪数据。** + +**例程:** +```arduino +#include + +float gyroX, gyroY, gyroZ; + +void setup() { + M5.begin(); + M5.IMU.Init(); +} +void loop() { + M5.IMU.getGyroData(&gyroX, &gyroY, &gyroZ); + M5.Lcd.setCursor(0, 30); + M5.Lcd.printf("X:%7.2f\nY:%7.2f\nZ:%7.2f ", gyroX, gyroY, gyroZ); + delay(500); +} +``` + +## getAccelData() + +**函数原型:** + +void getAccelData(float *ax, float *ay, float *az); + +**功能:获取 IMU 芯片的三轴加速度计数据。** + +**例程:** +```arduino +#include + +float accX, accY, accZ; + +void setup() { + M5.begin(); + M5.IMU.Init(); +} +void loop() { + M5.IMU.getAccelData(&accX, &accY, &accZ); + M5.Lcd.setCursor(0, 45); + M5.Lcd.printf("X:%5.2f\nY:%5.2f\nZ:%5.2f ", accX, accY, accZ); + delay(500); +} +``` + +## getAhrsData() + +**函数原型:** + +void getAccelData(float *pitch, float *roll, float *yaw); + +**功能:获取 IMU 芯片的姿态。** + +**例程:** +```arduino +#include + +float pitch, roll, yaw; + +void setup() { + M5.begin(); + M5.IMU.Init(); +} +void loop() { + M5.IMU.getAhrsData(&pitch, &roll, &yaw); + M5.Lcd.setCursor(0, 45); + M5.Lcd.printf("X:%5.2f\nY:%5.2f\nZ:%5.2f ", pitch, roll, yaw); + delay(500); +} +``` + +## getTempData() + +**函数原型:** + +void getTempData(float *t); + +**功能:获取 IMU 芯片的温度。** + +**例程:** +```arduino +#include + +float temp; + +void setup() { + M5.begin(); + M5.IMU.Init(); +} +void loop() { + M5.IMU.getTempData(&temp); + M5.Lcd.setCursor(0, 45); + M5.Lcd.printf("Temperature : %.2f C", temp); + delay(500); +} +``` \ No newline at end of file diff --git a/docs/zh_CN/api/pwm.md b/docs/zh_CN/api/pwm.md new file mode 100644 index 00000000..89c0a7cf --- /dev/null +++ b/docs/zh_CN/api/pwm.md @@ -0,0 +1,48 @@ +# PWM + +*PWM用于产生模拟信号驱动舵机或蜂鸣器* + +## ledcSetup() + +**函数原型:** + +void ledcSetup(uint8_t channel, double freq, uint8_t resolution_bits); + +**功能:设置PWM通道,频率和分辨率。** + +## ledcAttachPin() + +**函数原型:** + +void ledcAttachPin(uint8_t pin, uint8_t channel); + +**功能:将 LEDC 通道绑定到指定 IO 口上以实现输出** + +## ledWrite() + +**函数原型:** + +void ledcWrite(uint8_t channel, uint32_t duty); + +**功能:向channel通道写入duty%占空比。** + +**例程:** +```arduino +#include +int freq = 1800; +int channel = 0; +int resolution_bits = 8; +int buzzer = 2; + +void setup() { + M5.begin(); + ledcSetup(channel, freq, resolution_bits); + ledcAttachPin(buzzer, channel); +} +void loop() { + ledcWrite(channel, 128); + delay(1000); + ledcWrite(channel, 0); + delay(1000); +} +``` \ No newline at end of file diff --git a/docs/zh_CN/arduino/arduino_api.md b/docs/zh_CN/arduino/arduino_api.md index 25a28623..03e5f06f 100644 --- a/docs/zh_CN/arduino/arduino_api.md +++ b/docs/zh_CN/arduino/arduino_api.md @@ -11,71 +11,10 @@ |**[I2C](zh_CN/api/commutil)** |**[EEPROM](zh_CN/api/eeprom)**| |**[WIFI](zh_CN/api/wifi)**| - - ## M5StickC - - ||| |:---:|:---:| |**[System](zh_CN/api/system_m5stickc)** | **[AXP192](zh_CN/api/axp192_m5stickc)** | -|**[TFT 屏](zh_CN/api/lcd_m5stickc)** | **[SH200Q](zh_CN/api/sh200q_m5stickc)** | -|**[RTC](zh_CN/api/rtc)**| - - - - - - \ No newline at end of file +|**[TFT 屏](zh_CN/api/lcd_m5stickc)** | **[IMU](zh_CN/api/imu)** | +|**[RTC](zh_CN/api/rtc)** | **[PWM](en/api/pwm)** | diff --git a/docs/zh_CN/atom/atomic.md b/docs/zh_CN/atom/atomic.md index 4550bb07..f2da6413 100644 --- a/docs/zh_CN/atom/atomic.md +++ b/docs/zh_CN/atom/atomic.md @@ -21,8 +21,8 @@ - 1x Proto 空板 - 1x Proto 成品板(已焊排针) - 1x 3.96*4P 公头&母头 -- 1x 4P 2.0 排针 -- 1x 5P 2.0 排针 +- 1x 4P 2.54 排针 +- 1x 5P 2.54 排针 - 1x ATOMIC 外壳 - 1x M2*3mm 内六角杯头自攻螺丝 - 1x M2*8mm 内六角杯头机械牙螺丝 @@ -59,7 +59,7 @@ 产品尺寸 - 24*24*17mm + 24*24*18mm 包装尺寸 diff --git a/docs/zh_CN/base/w5500PoE.md b/docs/zh_CN/base/w5500PoE.md new file mode 100644 index 00000000..71463ada --- /dev/null +++ b/docs/zh_CN/base/w5500PoE.md @@ -0,0 +1,186 @@ +# Base PoE + +
SKU:K012-C
+ +
+ +## 描述 + +**Base PoE** 是一款支持PoE供电的以太网控制器底座,方便设备轻松接入互联网。它支持RS485/RS232通讯,可作为以太网转串口服务器使用。内置以W5500全硬件嵌入式以太网控制器,W5500集成了 TCP/IP 协议栈,具备8路独立硬件socket,10/100M 以太网数据链路层(MAC)及物理层(PHY)为嵌入式系统提供更加简易的互联网连接方案,支持PoE(有源以太网)技术,通过内置的PoE模块可以直接通过PoE集线器/交换机为底座供电而无需单独配备电源。为方便在工业应用场景的快速部署,套件内提供金属滑轨和磁盘便于安装固定,配备HT3.96端子用作RS485/RS232的电气连接,能够满足实际生产环境中的有线网络接入需求。 + +HT3.96连接器的 6 个引脚默认悬空,你可以根据需求选择连接RS232或RS485电平转换板。 + +**下图为 LAN 的内部构造** + +如果需要添加 RS485或RS232 通信接口,请将 TTL-RS485 或TTL-RS232 转接板与配套排针焊接到主板上相应的引脚上。 + + + +## 产品特性 + +- 支持PoE IEEE802.3 AF/AT +- 有线以太网接入 +- 支持RS485/RS232通信 +- 支持8路独立硬件Socket同时通信 +- 支持TCP、UDP、ICMP、IPv4、ARP、IGMP、PPPoE协议 +- 集成 10BaseT / 100Base-T 以太网 PHY +- 滑轨或磁吸固定 + +## 包含 + +- 1x PoE 底板 +- 1x TTL-RS485 转接板 +- 1x TTL-RS232 转接板 +- 1x 排针 20pin +- 1x 金属导轨和磁盘 +- 3x HT3.96 端子 + - 2x 3pin + - 1x 4pin +- 10x 冷压接端子 +- 3x 内六角扳手 +  - 1x 1.5mm +  - 1x 2mm +  - 1x 2.5mm +- 2x 内六角螺丝 M3x28 +- 4x 内六角自攻螺丝 KA2x4 +- 1x 沉头螺丝 M3x8 + + +## 应用 + +- 以太网转RS485/232串口 +- Modbus TCP/IP远程控制 +- 有线网络接入 + +## 规格参数 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
规格参数
以太网芯片W5500
支持协议TCP、UDP、ICMP、IPv4、ARP、IGMP、PPPoE
RS485芯片SP3485EE
RS232芯片MAX232
PoE供电方式空闲引脚供电(10M/100M Ethernet),J4&J5(VC-),J7&J8(VC+)
PoE规范IEEE802.3 AF/AT
DC输入电压9V~24V
净重32g
毛重132g
产品尺寸54*54*28mm
包装尺寸105*65*4mm
+ + +## EasyLoader + +>EasyLoader是一个简洁快速的程序烧录器,其内置了一个产品相关的案例程序,通过简单步骤将其烧录至主控,即可进行一系列的功能验证. + +
+
+
+
+ Windows + MacOS +
+
+
+ +
+ + +

案例描述:

+

通过以太网发送消息或指令控制M5Stack 6060PUSH或者屏幕显示消息

+
+
+
+ +### 管脚映射 + + + + + + + + + + + + + + + + + + + + + + + + + + +
M5StackGPIO13GPIO18GPIO19GPIO23GPIO26GPIO34GPIO5GPIO15
W5500 PoERSTCLKMISOMOSICSINTRX/ATX/B
+ +## 原理图 + + + +## 相关链接 + +- **Datasheet** + - [W5500](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/base/W5500_datasheet_v1.0.2_1_en.pdf) + - [SP485EEN](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/hat/SP485EEN_en.pdf) + - [MAX232](hhttps://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/atombase/AtomicRS232/MAX232.pdf) + +## 案例程序 + +- 获取Arduino代码[点击此处](https://github.com/m5stack/M5-ProductExampleCodes/tree/master/Base/W5500_PoE) + + \ No newline at end of file diff --git a/docs/zh_CN/core/m5stickc_plus.md b/docs/zh_CN/core/m5stickc_plus.md index 935a0d0d..c73c50de 100644 --- a/docs/zh_CN/core/m5stickc_plus.md +++ b/docs/zh_CN/core/m5stickc_plus.md @@ -6,7 +6,7 @@ ## 描述 -**M5StickC PLUS** 是[M5StickC](#/zh_CN/core/m5stickc.md)的加大屏幕版本,主控采用ESP32-PICO-D4模组,具备蓝牙4.0与WIFI功能,小巧的机身内部集成了丰富的硬件资源,如红外、RTC、麦克风、LED、IMU、按键、PMU等,在保留原有M5StickC功能的基础上加入了蜂鸣器,同时屏幕尺寸升级到1.14寸、135*240分辨率的TFT屏幕,相较之前的0.96寸屏幕增加18.7%的显示面积,电池容量达到120mAh,接口同样支持HAT与Unit系列产品. +**M5StickC PLUS** 是[M5StickC](#/zh_CN/core/m5stickc.md)的大屏幕版本,主控采用ESP32-PICO-D4模组,具备蓝牙4.0与WIFI功能,小巧的机身内部集成了丰富的硬件资源,如红外、RTC、麦克风、LED、IMU、按键、蜂鸣器、PMU等,在保留原有M5StickC功能的基础上加入了蜂鸣器,同时屏幕尺寸升级到1.14寸、135*240分辨率的TFT屏幕,相较之前的0.96寸屏幕增加18.7%的显示面积,电池容量达到120mAh,接口同样支持HAT与Unit系列产品. **开关机操作:** @@ -20,7 +20,7 @@ ## 产品特性 -- 基于 ESP32开发 +- 基于 ESP32开发,支持WiFi、蓝牙 - 内置3轴加速计与3轴陀螺仪 - 内置Red LED - 集成红外发射管 @@ -72,7 +72,7 @@ LCD屏幕 - 1.14 inch, 135*240 Colorful TFT LCD, ST7789 + 1.14 inch, 135*240 Colorful TFT LCD, ST7789v2 麦克风 @@ -175,19 +175,20 @@ -**红色 LED & 红外发射管 IR & 按键 BUTTON A & 按键 BUTTON B** +**红色 LED & 红外发射管 IR & 按键 BUTTON A & 按键 BUTTON B &蜂鸣器** - + +
ESP32 芯片GPIO10GPIO9GPIO37GPIO39
ESP32 芯片GPIO10GPIO9GPIO37GPIO39GPIO2
红色 LEDLED 管脚
红外发射管 IR 发射管引脚
按键 BUTTON A 按键管脚
按键 BUTTON B 按键管脚
蜂鸣器 蜂鸣器管脚
**彩色TFT屏幕** -驱动芯片:ST7789 +驱动芯片:ST7789v2 分辨率:135 * 240 diff --git a/docs/zh_CN/unit/m5camera_f.md b/docs/zh_CN/unit/m5camera_f.md index e91ef952..ea208603 100644 --- a/docs/zh_CN/unit/m5camera_f.md +++ b/docs/zh_CN/unit/m5camera_f.md @@ -21,8 +21,6 @@ -这个 Unit 还预留了 6 轴陀螺仪 (MPU6050) 、温湿度气压传感器 (BME280) 和**数字硅晶麦克风 (SPM1423)**的焊接口,如果您需要这些器件,可以自行焊接到对应位置上或者直接购买选配指定硬件版本的 M5CameraF。M5CameraF Unit 还预留了电池接口。外壳内可以容纳的电池大小对应电池容量为 **80mAh**。 - 因为模块可以生成 WIFI 热点 AP,所以可以用手机、PC 或其他设备通过 WIFI 无线获取摄像头图片,也可以通过模块的 GROVE 接口有线获取摄像头图片。 ## 产品特性 @@ -233,4 +231,4 @@ anchor_search(purchase_link,quickstart_link); scrollFunc(); -cript> \ No newline at end of file + \ No newline at end of file diff --git a/docs/zh_CN/unit/m5camera_f_new.md b/docs/zh_CN/unit/m5camera_f_new.md new file mode 100644 index 00000000..f814559e --- /dev/null +++ b/docs/zh_CN/unit/m5camera_f_new.md @@ -0,0 +1,199 @@ +# M5CameraF New{docsify-ignore-all} + +
SKU:U037
+ +
+ +## 描述 + +**M5CameraF** 是一款鱼眼广角图像识别开发板,视场角为150°,集成ESP32(4M Flash + 520K RAM + 4M PSRAM)芯片和200万像素的摄像头(OV2640).支持WiFi图像传输和USB端口调试. + +硬件上预装固件,通过ESP-IDF编程开发,运行WiFi-相机应用程序.默认程序输出图像尺寸为**600 * 800**,你可以通过优化程序输出更大尺寸. + +这个程序是如何使用的? +- 打开手机Wi-Fi,扫描并连接名称以"m5stack-"开头的AP热点. +- 打开手机浏览器,访问192.168.4.1,进入监控页面实时获取拍摄视频. +- 视频帧率大约在每秒5-6帧. + +因为模块可以生成 WIFI 热点 AP,所以可以用手机、PC 或其他设备通过 WIFI 无线获取摄像头图片,也可以通过模块的 GROVE 接口有线获取摄像头图片。 + +## 产品特性 + +- 基于ESP32设计 +- WIFI图像传输 +- CP2104 USB TTL +- 广角镜头150° +- OV2640视觉传感器 + +## 包含 + +- 1x M5CameraF +- 1x LEGO 适配件 +- 1x Wall/1515 +- 1x Type-C USB(20cm) + +## 规格参数 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
规格参数
Flash4M
RAM4MB
图像传感器OV2640
最大分辨率2百万像素
输出格式YUV(422/420)/YCbCr422,8位压缩数据,RGB565/555,8-/10位Raw RGB数据
最大图像传输速率UXGA/SXGA: 15fps, SVGA: 30fps, CIF: 60fps
视角150°
CCD尺寸1/4 inch
净重17g
毛重41g
产品尺寸24*48*19mm
包装尺寸75*45*30mm
+ +## EasyLoader + + + + + +>1.EasyLoader是一个简洁快速的程序烧录器,每一个产品页面里的EasyLoader都提供了一个与产品相关的案例程序,通过简单步骤将其烧录至主控,能够进行一系列的功能验证. + +>2.下载软件后,双击运行应用程序,将M5设备通过数据线连接至电脑,选择端口参数,点击 **"Burn"** 即可开始烧录.(**为M5StickC烧录时,请将波特率设置在750000或115200**) + +?>3.目前EasyLoader仅适用于Windows操作系统、兼容M5体系采用ESP32作为控制核心的主机.在为M5Core烧录前需要安装CP210X驱动程序(使用M5StickC作为控制器的则无需安装)[点击此处查看驱动安装教程](zh_CN/related_documents/M5Burner#安装串口驱动) + +## 管脚映射 + +**相机管脚映射** + +| *接口* | *Camera Pin*| *M5CameraF* | +|:------------------- | :--------:| :------: | +| SCCB Clock | SIOC |IO23 | +| SCCB Data | SIOD |IO22 | +| System Clock | XCLK |IO27 | +| Vertical Sync | VSYNC |IO25 | +| Horizontal Reference | HREF |IO26 | +| Pixel Clock | PCLK |IO21 | +| Pixel Data Bit 0 | D2 |IO32 | +| Pixel Data Bit 1 | D3 |IO35 | +| Pixel Data Bit 2 | D4 |IO34 | +| Pixel Data Bit 3 | D5 |IO5 | +| Pixel Data Bit 4 | D6 |IO39 | +| Pixel Data Bit 5 | D7 |IO18 | +| Pixel Data Bit 6 | D8 |IO36 | +| Pixel Data Bit 7 | D9 |IO19 | +| Camera Reset | RESET |IO15 | +| Camera Power Down | PWDN | *see Note 1* | +| Power Supply 3.3V | 3V3 | 3V3 | +| Ground | GND | GND | + +**GROVE 接口** + +| *Grove* | *M5CameraF* | +| :-----------: | :------: | +| SCL | IO13 | +| SDA | IO4 | +| 5V | 5V | +| GND | GND | + +**LED 接口** + +| *LED* | *M5CameraF* | +| :-----------:| :------: | +| LED_Pin | IO14 | + +**注意:** + +1. OV2640 芯片的 **PIN8(PDWN)**引脚为使能引脚,在该主板中通过12KΩ下拉电阻接地使能,进入工作模式.当 PIN8(PDWN)引脚上拉高电平时,将进入**Camera Power Down**模式. + +2. 以下是M5相机系列几款产品的主要参数区别. + + + +## 相关链接 + +- **数据手册** - [ESP32](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/esp32_datasheet_cn.pdf) - [OV2640](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/OV2640DS_en.pdf) + +## 案例程序 + +### 出厂固件(WiFi传输图像) + +- **[M5CameraF 固件](https://github.com/m5stack/m5stack-cam-psram/tree/master/wifi/wifi_sta/firmware/Camera%20F)** + + + +### 例程 + + - **[串口通信-M5CameraF](https://github.com/m5stack/m5stack-cam-psram/tree/master/uart/firmware/Camera%20F)** + + - **[串口通信-M5Core](https://github.com/m5stack/m5stack-cam-psram/tree/master/uart/arduino)**(串口通信例程为,摄像头与M5Core之间通信) + + - **[QRcode识别](https://github.com/m5stack/m5stack-cam-psram/tree/master/qr/firmware/Camera%20F)** + +### 源码 + + - **[M5Camera](https://github.com/m5stack/m5stack-cam-psram)** + +## 原理图 + +### 电源电路 + + + +### 芯片外围电路 + + + +### USB 转串口电路 + + + +cript> \ No newline at end of file