An Arduino library for the ESP32-S3-DevKitC-1 breakout board.
- Easy pin configuration for ESP32-S3-DevKitC-1
- Helper functions for common peripherals
- Support for onboard components
- Simple API for GPIO, I2C, SPI, and other interfaces
- Open the Arduino IDE
- Go to Sketch > Include Library > Manage Libraries...
- Search for "BCC_ESP32S3"
- Click "Install"
- Download this repository as a ZIP file
- In Arduino IDE, go to Sketch > Include Library > Add .ZIP Library...
- Select the downloaded ZIP file
- ESP32-S3-DevKitC-1 board
- USB cable for programming
| Function | ESP32-S3 Pin |
|---|---|
| RED_LED | 38 |
| YELLOW_LED | 39 |
| GREEN_LED | 40 |
| Function | ESP32-S3 Pin |
|---|---|
| BT1 | 47 |
| BT2 | 21 |
| Function | ESP32-S3 Pin |
|---|---|
| UART_TX | 17 |
| UART_RX | 18 |
| I2C_SDA | 8 |
| I2C_SCL | 9 |
| SPI_CS | 10 |
| SPI_MOSI | 11 |
| SPI_SCK | 12 |
| SPI_MISO | 13 |
| Function | ESP32-S3 Pin |
|---|---|
| A1 | 4 |
| A2 | 5 |
| A3 | 6 |
| A4 | 7 |
| Function | ESP32-S3 Pin |
|---|---|
| D1 | 15 |
| D2 | 16 |
| D3 | 3 |
| D4 | 46 |
| BUZZER | 14 |
| Function | ESP32-S3 Pin |
|---|---|
| DRV_PWMA | 48 |
| DRV_A1 | 0 |
| DRV_A2 | 45 |
| DRV_PWMB | 36 |
| DRV_B1 | 35 |
| DRV_B2 | 37 |
#include <BCC_ESP32S3.h>
BCC_ESP32S3 board;
void setup() {
Serial.begin(115200);
/* Initialize the motor driver. */
board.motor_init();
/* Direct pin control for LEDs. */
pinMode(RED_LED, OUTPUT);
pinMode(YELLOW_LED, OUTPUT);
pinMode(GREEN_LED, OUTPUT);
digitalWrite(RED_LED, HIGH);
delay(500);
digitalWrite(RED_LED, LOW);
/* Using I2C pins directly. */
Wire.begin(I2C_SDA, I2C_SCL);
/* Using SPI pins directly. */
SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI, SPI_CS);
}
void loop() {
/* Motor control example. */
/* Parameters: motor_a, motor_b (-100 to 100). */
/* Move forward at 50% speed. */
board.motor(50, 50);
delay(2000);
/* Turn right at 50% speed. */
board.motor(50, -50);
delay(1000);
/* Move backward at 50% speed. */
board.motor(-50, -50);
delay(2000);
/* Turn left at 50% speed. */
board.motor(-50, 50);
delay(1000);
/* Stop. */
board.motor(0, 0);
delay(1000);
}This library provides pin definitions for the ESP32-S3-DevKitC-1 breakout board and includes motor control functionality for the TB6612FNG motor driver.
The library includes examples demonstrating various features:
- MotorControl: Control the TB6612FNG motor driver
- LEDControl: Control the on-board RGB LEDs in a traffic light sequence
- ButtonControl: Use two buttons to cycle through the three LEDs (RED, YELLOW, GREEN)
This library is released under the MIT License. See the included LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
Developed by Nonpawit Ekburanawat.