thresholdWiring guide ↗

ESP32-C3 SUPER MINI

Flash with Arduino IDE.

One sketch. Your controller’s own configuration. Upload over USB from your Windows PC.

Download Arduino IDE firmware ↓

1. Install the board and libraries

Install Arduino IDE 2. Under File → Preferences, add this Additional boards manager URL:

https://espressif.github.io/arduino-esp32/package_esp32_index.json

In Boards Manager install esp32 by Espressif Systems — 2.0.17. Use that version for this firmware.

In Library Manager install WebSockets by Markus Sattler — 2.7.2, NimBLE-Arduino by h2zero — 2.5.1 and ArduinoJson by Benoit Blanchon — 7.4.2.

2. Add this door’s configuration

  1. Extract the ZIP to a short folder, such as C:\DoorFirmware. Open the RitikDoorController folder.
  2. In the app, select/create the correct door under Controller setup. Load its credentials with your account password and download device_config.h.
  3. Copy that file beside RitikDoorController.ino, then open the .ino in Arduino IDE. Keep controller.cpp, root_ca.h and partitions.csv alongside it.

The .ino is intentionally short. Arduino compiles the full implementation in the controller.cpp tab. Each lock needs a different downloaded configuration.

3. Choose board settings

Select ESP32C3 Dev Module under Tools → Board → esp32.

  • USB CDC On Boot: Enabled
  • CPU Frequency: 160 MHz (WiFi)
  • Flash Mode: DIO; Flash Frequency: 80 MHz
  • Flash Size: 4MB (32Mb)
  • Partition Scheme: Huge APP (3MB No OTA/1MB SPIFFS)
  • Upload Speed: 115200
  • Erase All Flash Before Sketch Upload: Disabled
  • Port: your board’s COM port

Keep the supplied partitions.csv beside the sketch.

Factory shipment of an unclaimed sale board: use Erase All Flash → Enabled for its final factory upload to clear test Wi-Fi, then restore Disabled. Flash erasure never resets cloud ownership.

4. Verify, upload, connect

  1. Leave the door release wires disconnected. Connect the ESP32 with a USB data cable.
  2. Click Verify (✓), then Upload (→).
  3. If the board is not detected or upload stays on Connecting: hold BOOT, tap RESET, release BOOT, select the new COM port and retry. After upload, tap RESET with BOOT released.
  4. Open Serial Monitor at 115200 baud. If prompted to load the private configuration, check its filename is device_config.h (not .h.txt), then rebuild.
  5. On Android use Bluetooth setup in the app. On first use, iPhone joins the open controller hotspot and visits http://192.168.4.1. After Wi-Fi connects, scan the private setup card to create the customer admin account. Later Wi-Fi setup requires BOOT and the device setup password.

Wait for Controller online and follow the wiring guide’s COM/NO bench checks before connecting the release wires. No physical board has been flashed or tested during development.

The ZIP includes a detailed ARDUINO-IDE.md with troubleshooting. See also the official ESP32 installation instructions.