Update
This commit is contained in:
51
esp32c3-dev-board/.github/workflows/build-samples.yml
vendored
Normal file
51
esp32c3-dev-board/.github/workflows/build-samples.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
name: Build Examples
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ./firmware
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
example:
|
||||
- ./firmware/esp32c3-blink
|
||||
- ./firmware/esp32c3-wifi-scan
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: "recursive"
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.9"
|
||||
|
||||
- name: Install PlatformIO
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install --upgrade platformio
|
||||
|
||||
- name: Build examples
|
||||
run: |
|
||||
pio run -d ${{ matrix.example }}
|
||||
28
esp32c3-dev-board/LICENSE
Normal file
28
esp32c3-dev-board/LICENSE
Normal file
@@ -0,0 +1,28 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2023, sonocotta
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
110
esp32c3-dev-board/README.md
Normal file
110
esp32c3-dev-board/README.md
Normal file
@@ -0,0 +1,110 @@
|
||||
# ESP32-C3 Development Board
|
||||
|
||||

|
||||

|
||||
<a href="https://www.tindie.com/stores/sonocotta/?ref=offsite_badges&utm_source=sellers_andrey-malyshenko&utm_medium=badges&utm_campaign=badge_medium"><img src="https://d2ss6ovg47m0r5.cloudfront.net/badges/tindie-mediums.png" alt="I sell on Tindie" width="150" height="78"></a>
|
||||
<br />
|
||||
[](https://discord.gg/PtnaAaQMpS)
|
||||
|
||||
The ESP32 C3 Nano is an Arduino Nano compatible development board, designed to provide enhanced computing power, wireless connectivity, addressable LED capabilities, and a built-in programming and debugging interface.
|
||||
|
||||
It is based on the ESP32 C3 chip, which provides improved processing capabilities, increased memory, and wireless connectivity compared to traditional Atmega variant.
|
||||
|
||||
The board maintains compatibility with the Arduino Nano form factor, ensuring easy integration into existing projects and making it a drop-in replacement for the traditional Arduino Nano board.
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- [ESP32-C3](https://www.espressif.com/en/products/socs/esp32-c3) 32-bit RISC-V MCU in a 32-pin package
|
||||
- Up to 160 MHz CPU clock
|
||||
- 4 MB Flash
|
||||
- 400 KB SRAM
|
||||
- WiFi and BLE
|
||||
- Native USB for flashing and debugging
|
||||
- Onboard 3V3 LDO (disconnected for low power applications)
|
||||
- Flash using Arduino IDE, Platformio, or the IDE of your choice
|
||||
- One RGB LED (WS2812B)
|
||||
- RESET button
|
||||
|
||||
## ESP32-C3
|
||||
|
||||
ESP32-C3 is an entry-level 32-bit MCU in the ESP32 line. Generally they offer similar feature set compared to other ESP32 chips, but designed to be low-cost from the start, including popular communication interfaces, low power consumption in sleep mode (down to few micro-amps) and ease of use.
|
||||
|
||||
| | ESP8266 | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 |
|
||||
|---------------|----------|------------|------------|------------|------------|
|
||||
| Cores | 1x L106 | 2x LX6 | 1x RISC-V | 1x LX7 | 2x LX7
|
||||
| Max Frequency | 160 Mhz | 240 Mhz | 160 Mhz | 240 Mhz | 240 Mhz
|
||||
| Flash | External 1 MB (Typical)| External Up to 16 MB | Internal 4 MB or External | Internal 4 MB or External | Internal 8 MB or External
|
||||
| SRAM Total | 160 KB | 320 KB | 400 KB | 320 KB | 520 KB
|
||||
| SRAM Usable | 80 KB | 160 KB | 160 KB | 180 KB | 225 KB
|
||||
| PSRAM | NA | External 4 MB | NA | Internal 2 MB or Ext | Internal 2 MB or 8 MB or Ext
|
||||
| GPIO count | 11 Usable| 34 Total | 22 Total | 43 Total | 45 Total
|
||||
| Connectivity | WiFi | WiFi + BT | WiFi + BLE | WiFi | WiFi + BLE
|
||||
| USB | No | No | Yes + JTAG | Yes | Yes + JTAG
|
||||
| UART | 1+ | 3 | 2 | 2 | 3
|
||||
| I2C | 1 | 2 | 1 | 2 | 2
|
||||
| SPI | 1 | 4 | 3 | 4 | 4
|
||||
| I2S | 1 | 2 | 1 | 1 | 2
|
||||
| LCD | No | No | No | No | Yes
|
||||
|
||||
## Board Pinout
|
||||
|
||||

|
||||
|
||||
## MCU Pinout
|
||||
|
||||

|
||||
|
||||
## How to programm
|
||||
|
||||
To program the ESP32-C3 microcontroller, you may use either Serial upload method or USB Upload. ESP32-C3 Development Board uses USB Upload method.
|
||||
|
||||
You need to connect USB-C cable, it will be used to power the board, flash over USB, serial over USB and JTAG over USB
|
||||
|
||||
### Arduino IDE
|
||||
|
||||
Add [https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json](https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json) to the board manager
|
||||
|
||||

|
||||
|
||||
After that you should install **ESP32 by Espressif Systems** from Board Manager
|
||||
|
||||

|
||||
|
||||
Select **ESP32 C3 Dev Board** as target and other necessary settings in the board settings after
|
||||
|
||||

|
||||
|
||||
Next press Build or Upload button, it should just work (RGB LED will blik white with blinky example)
|
||||
|
||||

|
||||
|
||||
### Platformio IDE
|
||||
|
||||
After installing [Plarformio IDE](https://platformio.org/platformio-ide), open sample [arduino project](/firmware/esp32c3-blink). Run `Build` command to install necessary tools and libraries.
|
||||
|
||||
Next run `Upload: esp32-dev-board` task to start upload over USB. `Monitor` task should give you Serial monitor, as long as you have your board connected via USB (Serial port appears right after board boots up).
|
||||
|
||||
## Hardware
|
||||
|
||||
Board schematic can be found in the [hardware](/hardware) section
|
||||
|
||||
| Front | Back |
|
||||
|---|---|
|
||||
|  | 
|
||||
|
||||
|
||||
-  ESP32-C3 MCU
|
||||
-  WS2812B RGB LED
|
||||
-  Programming and Debug port (USB-C)
|
||||
-  Hardware Reset button
|
||||
-  VIN disconnect - cut this line to disconnect LDO chip and power-on LED, recommended for low-power applications
|
||||
|
||||
## Where to buy
|
||||
|
||||
Available at [Tindie](https://www.tindie.com/products/sonocotta/esp32-c3-development-board)
|
||||
|
||||
## Links
|
||||
|
||||
- [ESP32-C3 Product Page](https://www.espressif.com/en/products/socs/esp32-c3)
|
||||
5
esp32c3-dev-board/firmware/esp32c3-blink/.gitignore
vendored
Normal file
5
esp32c3-dev-board/firmware/esp32c3-blink/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.pio
|
||||
.vscode/.browse.c_cpp.db*
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/ipch
|
||||
10
esp32c3-dev-board/firmware/esp32c3-blink/.vscode/extensions.json
vendored
Normal file
10
esp32c3-dev-board/firmware/esp32c3-blink/.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"platformio.platformio-ide"
|
||||
],
|
||||
"unwantedRecommendations": [
|
||||
"ms-vscode.cpptools-extension-pack"
|
||||
]
|
||||
}
|
||||
14
esp32c3-dev-board/firmware/esp32c3-blink/platformio.ini
Normal file
14
esp32c3-dev-board/firmware/esp32c3-blink/platformio.ini
Normal file
@@ -0,0 +1,14 @@
|
||||
[env]
|
||||
platform = espressif32
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
monitor_filters = colorize, esp32_exception_decoder
|
||||
upload_speed = 460800
|
||||
build_type = debug
|
||||
lib_deps =
|
||||
adafruit/Adafruit NeoPixel @ ^1.11.0
|
||||
|
||||
[env:esp32-dev-board]
|
||||
board = lolin_c3_mini
|
||||
build_flags =
|
||||
-D SERIAL_BAUD=115200
|
||||
32
esp32c3-dev-board/firmware/esp32c3-blink/src/main.cpp
Normal file
32
esp32c3-dev-board/firmware/esp32c3-blink/src/main.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_NeoPixel.h>
|
||||
#include <Ticker.h>
|
||||
|
||||
#define PIN_LED 8
|
||||
#define LED_COUNT 1
|
||||
|
||||
Adafruit_NeoPixel pixels(LED_COUNT, PIN_LED, NEO_GRB + NEO_KHZ800);
|
||||
Ticker tOn, tOff;
|
||||
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(SERIAL_BAUD);
|
||||
Serial.println(F("Hello,"));
|
||||
Serial.println(F("I'm"));
|
||||
Serial.println(F("ESP32-C3!"));
|
||||
|
||||
tOn.attach_ms(500, [](){
|
||||
pixels.setPixelColor(0, pixels.Color(0, 150, 0));
|
||||
pixels.show();
|
||||
});
|
||||
delay(250);
|
||||
tOff.attach_ms(500, [](){
|
||||
pixels.setPixelColor(0, pixels.Color(0, 0, 0));
|
||||
pixels.show();
|
||||
|
||||
Serial.printf("[%ld] %#08lx\n", millis(), random());
|
||||
});
|
||||
}
|
||||
|
||||
void loop(){}
|
||||
5
esp32c3-dev-board/firmware/esp32c3-wifi-scan/.gitignore
vendored
Normal file
5
esp32c3-dev-board/firmware/esp32c3-wifi-scan/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.pio
|
||||
.vscode/.browse.c_cpp.db*
|
||||
.vscode/c_cpp_properties.json
|
||||
.vscode/launch.json
|
||||
.vscode/ipch
|
||||
10
esp32c3-dev-board/firmware/esp32c3-wifi-scan/.vscode/extensions.json
vendored
Normal file
10
esp32c3-dev-board/firmware/esp32c3-wifi-scan/.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"platformio.platformio-ide"
|
||||
],
|
||||
"unwantedRecommendations": [
|
||||
"ms-vscode.cpptools-extension-pack"
|
||||
]
|
||||
}
|
||||
12
esp32c3-dev-board/firmware/esp32c3-wifi-scan/platformio.ini
Normal file
12
esp32c3-dev-board/firmware/esp32c3-wifi-scan/platformio.ini
Normal file
@@ -0,0 +1,12 @@
|
||||
[env]
|
||||
platform = espressif32
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
monitor_filters = colorize, esp32_exception_decoder
|
||||
upload_speed = 460800
|
||||
build_type = debug
|
||||
|
||||
[env:esp32-dev-board]
|
||||
board = lolin_c3_mini
|
||||
build_flags =
|
||||
-D SERIAL_BAUD=115200
|
||||
89
esp32c3-dev-board/firmware/esp32c3-wifi-scan/src/main.cpp
Normal file
89
esp32c3-dev-board/firmware/esp32c3-wifi-scan/src/main.cpp
Normal file
@@ -0,0 +1,89 @@
|
||||
#include <Arduino.h>
|
||||
#include "WiFi.h"
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(SERIAL_BAUD);
|
||||
Serial.println(F("Hello,"));
|
||||
Serial.println(F("I'm"));
|
||||
Serial.println(F("ESP32-C3!"));
|
||||
|
||||
// Set WiFi to station mode and disconnect from an AP if it was previously connected.
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.disconnect();
|
||||
delay(100);
|
||||
|
||||
Serial.println("Setup done");
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
Serial.println("Scan start");
|
||||
|
||||
// WiFi.scanNetworks will return the number of networks found.
|
||||
int n = WiFi.scanNetworks();
|
||||
Serial.println("Scan done");
|
||||
if (n == 0)
|
||||
{
|
||||
Serial.println("no networks found");
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.print(n);
|
||||
Serial.println(" networks found");
|
||||
Serial.println("Nr | SSID | RSSI | CH | Encryption");
|
||||
for (int i = 0; i < n; ++i)
|
||||
{
|
||||
// Print SSID and RSSI for each network found
|
||||
Serial.printf("%2d", i + 1);
|
||||
Serial.print(" | ");
|
||||
Serial.printf("%-32.32s", WiFi.SSID(i).c_str());
|
||||
Serial.print(" | ");
|
||||
Serial.printf("%4d", WiFi.RSSI(i));
|
||||
Serial.print(" | ");
|
||||
Serial.printf("%2d", WiFi.channel(i));
|
||||
Serial.print(" | ");
|
||||
switch (WiFi.encryptionType(i))
|
||||
{
|
||||
case WIFI_AUTH_OPEN:
|
||||
Serial.print("open");
|
||||
break;
|
||||
case WIFI_AUTH_WEP:
|
||||
Serial.print("WEP");
|
||||
break;
|
||||
case WIFI_AUTH_WPA_PSK:
|
||||
Serial.print("WPA");
|
||||
break;
|
||||
case WIFI_AUTH_WPA2_PSK:
|
||||
Serial.print("WPA2");
|
||||
break;
|
||||
case WIFI_AUTH_WPA_WPA2_PSK:
|
||||
Serial.print("WPA+WPA2");
|
||||
break;
|
||||
case WIFI_AUTH_WPA2_ENTERPRISE:
|
||||
Serial.print("WPA2-EAP");
|
||||
break;
|
||||
case WIFI_AUTH_WPA3_PSK:
|
||||
Serial.print("WPA3");
|
||||
break;
|
||||
case WIFI_AUTH_WPA2_WPA3_PSK:
|
||||
Serial.print("WPA2+WPA3");
|
||||
break;
|
||||
case WIFI_AUTH_WAPI_PSK:
|
||||
Serial.print("WAPI");
|
||||
break;
|
||||
default:
|
||||
Serial.print("unknown");
|
||||
}
|
||||
Serial.println();
|
||||
delay(10);
|
||||
}
|
||||
}
|
||||
Serial.println("");
|
||||
|
||||
// Delete the scan result to free memory for code below.
|
||||
WiFi.scanDelete();
|
||||
|
||||
// Wait a bit before scanning again.
|
||||
delay(5000);
|
||||
}
|
||||
BIN
esp32c3-dev-board/hardware/rev A/Gerber_2305-esp32-c3-nano-a.zip
Normal file
BIN
esp32c3-dev-board/hardware/rev A/Gerber_2305-esp32-c3-nano-a.zip
Normal file
Binary file not shown.
32230
esp32c3-dev-board/hardware/rev A/PCB_2305-esp32-c3-nano-a_2023-07-19.pdf
Normal file
32230
esp32c3-dev-board/hardware/rev A/PCB_2305-esp32-c3-nano-a_2023-07-19.pdf
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
esp32c3-dev-board/images/open-source-hardware-logo.png
Normal file
BIN
esp32c3-dev-board/images/open-source-hardware-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
esp32c3-dev-board/images/open-source-software-logo.png
Normal file
BIN
esp32c3-dev-board/images/open-source-software-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
Reference in New Issue
Block a user