diff --git a/.gitignore b/.gitignore
index 4de822f..4b9f1da 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,8 @@
.vscode/launch.json
.vscode/ipch
.DS_Store
+upload_params.ini
+
+# projectplan and design
+*.kanban
+*.excalidraw
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..901dd8b
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,23 @@
+{
+ "files.associations": {
+ "*.json": "json",
+ "array": "cpp",
+ "deque": "cpp",
+ "string": "cpp",
+ "unordered_map": "cpp",
+ "unordered_set": "cpp",
+ "vector": "cpp",
+ "string_view": "cpp",
+ "initializer_list": "cpp",
+ "span": "cpp",
+ "*.tcc": "cpp",
+ "system_error": "cpp",
+ "regex": "cpp",
+ "compare": "cpp",
+ "functional": "cpp",
+ "tuple": "cpp",
+ "type_traits": "cpp",
+ "utility": "cpp",
+ "limits": "cpp"
+ }
+}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18c1792..61654f7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,5 @@
CHANGELOG
-## v0.0.0
+## v1.0.0
-PLEASE WRITE YOUR CHANGES BEFORE YOU CREATE A RELEASE IN THE CHANGELOG.MD FILE!
+Add RGB NeoPixel example.
\ No newline at end of file
diff --git a/README.md b/README.md
index b77605e..5d48e70 100644
--- a/README.md
+++ b/README.md
@@ -1,91 +1,19 @@
-# ESP32 project template
+# ESP32-C6 examples
## Description
-This is a project template to create microcontroller apps with automatized firmware builds for [esp32](https://www.espressif.com/en/products/socs/esp32), [esp32s2](https://www.espressif.com/en/products/socs/esp32-s2) and [esp32s3](https://www.espressif.com/en/products/socs/esp32-s3) microcontroller boards. It uses for that [GitHub Actions](https://github.com/features/actions) and [platformio](https://platformio.org/). Use this repository as a template for your own esp32 projects.
+Uncomment `src_dir=` in the `platform.ini` file.
-## Requirements
-
-- [GitHub Actions](https://github.com/features/actions)
-- [platformio](https://platformio.org/)
-- [python](https://www.python.org/)
-
-## GitHub Actions - Workflow
-
-The release build happens in the `build & release` workflow: [build_release.yml](.github/workflows/build_release.yml).
-It creates a release, after creation of a new git tag (named it like `v1.0.0`).
-
-If you want to test the build on all merge w/o creating a tag then the `build` workflow is what you looking for: [build.yml](.github/workflows/build.yml)
-
-## PlatformIO
-
-[PlatformIO](https://platformio.org/) is a tool to create microcontroller apps for arduino platforms and compatibles (esp32). You can install the [Visual Studio Code extension](https://platformio.org/install/ide?install=vscode) in the [Visual Studio Code](https://code.visualstudio.com/) IDE.
-
-## Python
-
-There is a tiny python script needed to customize the firmware filenames within platformio, see documentation: https://docs.platformio.org/en/stable/scripting/examples/custom_program_name.html
-
-The [extra_script.py](extra_script.py) script gets the platformio env (e.g. lolin32) and the git-tag for the firmware filename.
-This is required to publish several firmware names in the github artifacts of a release.
-
-## Get Started
-
-
-
-1. Login to github
-
-2. Click on `Use this template` to create a new git repository
-3. Implement your application in the [src/main.cpp](src/main.cpp)
-4. Comment your new change in the [CHANGELOG.md](CHANGELOG.md) file
-5. Push your changes
-
-```sh
-git add .
-```
-
-```sh
-git commit -am "my app"
-```
-
-```sh
-git push -u origin main
-```
-
-5. Create a new tag to trigger a release, e.g. for v1.0.0
-
-```sh
-git tag v1.0.0
-```
-
-```sh
-git push origin v1.0.0
-```
-
-6. You can find your firmwares under `Releases` after the CI build finished
-
-## CHANGELOG
-
-You can write your changes in the [CHANGELOG.md](CHANGELOG.md) before you create a release. It will be shown under the release page.
-
-## Example Release
-
-see [Releases](https://github.com/mcuw/esp-ghbuild-template/releases) on the right sidemenu.
-
-## Customize your project
-
-You can reduce and adapt your required boards in the [platformio.ini](platformio.ini).
+## Supported boards
-Update the [CHANGELOG.md](CHANGELOG.md) file before you are creating a new release. By creating a new git tag you trigger a new release which generate for you the firmwares.
+- [NanoESP32-C6](https://s.click.aliexpress.com/e/_ooBtUih) (affiliate link) with up to 16MB flash [datasheet](doc/nanoESP32C6.pdf)
-## Supported boards
+- [Super Mini ESP32-C6](https://s.click.aliexpress.com/e/_DeLjVMb) (affiliate link) with 4MB flash and W2812 RGB LED
-- ESP32 (buy with affiliate link: [LILYGO T-Beam](https://s.click.aliexpress.com/e/_DBzslDV) with LoRA, lolin32, lolin D32 pro)
-- ESP32 S2
-- ESP32 S3 (buy with affiliate link: [LILYGO T-Display S3](https://s.click.aliexpress.com/e/_DBmOMkn), [LILYGO T-Display-S3 AMOLED](https://s.click.aliexpress.com/e/_DmboYpZ), [LILYGO T-Display-S3 Touch](https://s.click.aliexpress.com/e/_DCBgPlV), [LILYGO T-Display S3 Long](https://s.click.aliexpress.com/e/_Dl6UVMx))
-- ESP32 C6 with WiFi 6 and BT-5 LE (buy with affiliate link: [UICPAL nanoESP32-C6](https://s.click.aliexpress.com/e/_DdZ83IB) with up to 16MB flash, [ESP32-C6](https://s.click.aliexpress.com/e/_DeLjVMb) with 4MB flash and W2812 RGB LED)
+- [LilyGo T-QT-C6](https://github.com/mcuw/esp32-t-qt-c6-sdk): use Arduino SDK https://github.com/mcuw/esp32-t-qt-c6-sdk
## Disclaimer
-Contribution and help ... if you find an issue or wants to contribute then please do not hesitate to create a merge request or an issue.
+Contribution and help ... if you find an issue or wants to contribute then please do not hesitate to create a pull request or an issue.
We provide our build template as is, and we make no promises or guarantees about this code.
diff --git a/boards/esp32-c6-n16.json b/boards/esp32-c6-n16.json
index 287f5e4..2bf4036 100644
--- a/boards/esp32-c6-n16.json
+++ b/boards/esp32-c6-n16.json
@@ -7,10 +7,11 @@
"mcu": "esp32c6",
"variant": "esp32c6",
"extra_flags": [
- "-DARDUINO_ESP32S3_DEV",
+ "-DARDUINO_ESP32C6_DEV",
"-DARDUINO_USB_MODE=1",
"-DARDUINO_USB_CDC_ON_BOOT=1"
- ]
+ ],
+ "partitions": "default_16MB.csv"
},
"connectivity": [
"wifi",
diff --git a/doc/nanoESP32C6.pdf b/doc/nanoESP32C6.pdf
new file mode 100644
index 0000000..6b3ca9d
Binary files /dev/null and b/doc/nanoESP32C6.pdf differ
diff --git a/examples/mac/main.cpp b/examples/mac/main.cpp
new file mode 100644
index 0000000..bb3926c
--- /dev/null
+++ b/examples/mac/main.cpp
@@ -0,0 +1,14 @@
+#include
+#include
+
+void setup()
+{
+ Serial.begin(115200);
+}
+
+void loop()
+{
+ WiFi.mode(WIFI_STA);
+ Serial.println(WiFi.macAddress());
+ delay(1000);
+}
\ No newline at end of file
diff --git a/examples/ota-manager-rtos/credentials.h b/examples/ota-manager-rtos/credentials.h
new file mode 100644
index 0000000..d5b84e8
--- /dev/null
+++ b/examples/ota-manager-rtos/credentials.h
@@ -0,0 +1,3 @@
+#ifndef AP_PSK
+#define AP_PSK "12345678"
+#endif
diff --git a/examples/ota-manager-rtos/main.cpp b/examples/ota-manager-rtos/main.cpp
new file mode 100644
index 0000000..51ec389
--- /dev/null
+++ b/examples/ota-manager-rtos/main.cpp
@@ -0,0 +1,257 @@
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "credentials.h"
+#include
+
+#define PREF_KEY "config"
+#define PREF_SSID_KEY "ssid"
+#define PREF_PASSPHRASE_KEY "passphrase"
+
+String ap_default_psk(AP_PSK); // Set your default PSK in credentials.h if you want
+ESPTelnetStream telnet;
+
+WebServer server(80);
+Preferences prefs;
+
+TaskHandle_t OTATask, TelnetTask, UiTask, SleepTask;
+OTA ota;
+
+// sleep modes, see
+// https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/sleep_modes.html
+
+void initDevBoard(uint8_t redValue = 0, uint8_t greenValue = 0, uint8_t blueValue = 0)
+{
+ // init RGB-LED
+ neopixelWrite(PIN_NEOPIXEL, redValue, greenValue, blueValue);
+
+ // you can initialize the dev board here ...
+}
+
+void handleRoot()
+{
+ if (server.hasArg(PREF_SSID_KEY) && server.arg(PREF_SSID_KEY).length() && server.hasArg(PREF_PASSPHRASE_KEY) && server.arg(PREF_PASSPHRASE_KEY).length())
+ {
+ const String ssid(server.arg(PREF_SSID_KEY));
+ prefs.begin(PREF_KEY, false);
+ prefs.putString(PREF_SSID_KEY, ssid);
+ prefs.putString(PREF_PASSPHRASE_KEY, server.arg(PREF_PASSPHRASE_KEY));
+ prefs.end();
+
+ serialPrint("Credentials saved for: ");
+ serialPrintln(ssid);
+ telnet.print("Credentials saved for: ");
+ telnet.println(ssid);
+
+ char success[150];
+ snprintf(
+ success, 148,
+ "\
+\
+ ESP32-C6 OTA with webserver\
+ \
+\
+\
+\
+