Project Overview
The project is based on the Ai-Thinker BW21 module development board. Thanks to its powerful performance and mature ecosystem, it can support various AI applications such as:
- Facial recognition
- Gesture recognition
- Object recognition
- ···
This offers great convenience for the rapid development and deployment of smart devices and products.
For the expansion board project, refer to: Smart Interaction and Recognition Robot – LCSC Open Hardware Platform
For the core board project, refer to: BW21-CBV-Kit AI Vision Recognition Development Board – LCSC Open Hardware Platform
Specifications and Features
- All module IOs are led out for easy peripheral connections and debugging
- Additional 5V, 3.3V, and GND pin headers to facilitate peripheral development
- Integrated TP4057 charging management circuit, supporting 3.7V lithium battery input
- Charging system includes a charge indicator LED and XH2.54 power connector for easy modular assembly and testing
- DHT11 one-wire sensor interface with pull-up resistor, allowing direct connection
- I2C interface for OLED display modules
- SPI interface for TFT color displays
Functional Interfaces
Includes:
- Pin headers for expansion
- Power output pins
- Charging indicator
- Status LED
- XH2.54 battery power interface
- DHT11 sensor connector
- I2C OLED display interface
- SPI TFT screen interface
3D Enclosure Design
- M3 mounting holes at four corners for easy DIY installation
- Pin and power header design enables external module connection
- Female headers for TFT and OLED displays allow quick testing and validation
- Recess under BW21 core module for enhanced heat dissipation
- Antenna groove for better wireless performance
- Precision cutouts on the side for Type-C charging port, LED indicators, and DHT11 sensor access
3D Enclosure Design
Pin Mapping: SCL – E3 (Pin 13) SDA – E4 (Pin 12)
Test code
Create a new Arduino project and add the following code
#include <Wire.h>#include <Adafruit_OLED_libraries/Adafruit_GFX.h>#include <Adafruit_OLED_libraries/Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)// The pins for I2C are defined by the Wire-library.#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)#define SCREEN_ADDRESS 0x3C ///< See datasheet for AddressAdafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
#define NUMFLAKES 10 // Number of snowflakes in the animation example
#define LOGO_HEIGHT_FLAKES 16#define LOGO_WIDTH_FLAKES 16static const unsigned char PROGMEM logo_bmp_flake[] =
{0b00000000, 0b11000000,
0b00000001, 0b11000000,
0b00000001, 0b11000000,
0b00000011, 0b11100000,
0b11110011, 0b11100000,
0b11111110, 0b11111000,
0b01111110, 0b11111111,
0b00110011, 0b10011111,
0b00011111, 0b11111100,
0b00001101, 0b01110000,
0b00011011, 0b10100000,
0b00111111, 0b11100000,
0b00111111, 0b11110000,
0b01111100, 0b11110000,
0b01110000, 0b01110000,
0b00000000, 0b00110000};
void setup(){
Serial.begin(115200);
// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
if (!display.begin(SSD1306_SWITCHCAPVCC,...
Read more »