Stufin
Home Quick Cart Profile

Witty Fox - ESP32 Storm Board with Support for Battery Charging & Wireless Programming

Buy Now

Pin Configuration

  • Witty Fox - ESP32 Storm Board Pinout Guide
  • The Witty Fox - ESP32 Storm Board is a powerful IoT development board that combines the ESP32 microcontroller with additional features such as battery charging and wireless programming. Here is a detailed pinout guide to help you understand the functionality of each pin on the board:
  • GPIO Pins (1-34)
  • GPIO 0-15 (Digital Pins):
  • + These pins can be used as digital input/output pins or as specialty pins for specific functions (e.g., I2C, SPI, UART).
  • + Pin 0: GPIO 0 (also used as flash button)
  • + Pin 1: GPIO 1 (also used as UART_TX)
  • + Pin 2: GPIO 2 (also used as UART_RX)
  • + Pin 3: GPIO 3 (also used as I2C_SCL)
  • + Pin 4: GPIO 4 (also used as I2C_SDA)
  • + Pin 5-15: GPIO 5-15 (general-purpose digital pins)
  • GPIO 16-27 (Analog Input Pins):
  • + These pins can be used as analog input pins or as digital input/output pins.
  • + Pin 16: GPIO 16 (also used as ADC1_CH0)
  • + Pin 17: GPIO 17 (also used as ADC1_CH1)
  • + Pin 18: GPIO 18 (also used as ADC1_CH2)
  • + Pin 19: GPIO 19 (also used as ADC1_CH3)
  • + Pin 20-27: GPIO 20-27 (analog input pins or digital pins)
  • GPIO 32-34 (Special Pins):
  • + Pin 32: GPIO 32 (input-only pin, connected to the internal hall sensor)
  • + Pin 33: GPIO 33 (input-only pin, connected to the internal hall sensor)
  • + Pin 34: GPIO 34 (input-only pin, connected to the internal touch sensor)
  • Power and Battery Management Pins
  • VIN (Vin): Input voltage pin for the board (supports 5V-12V)
  • VOUT (3.3V): Output voltage pin regulated to 3.3V
  • GND: Ground pin
  • BAT: Battery pin (for LiPo or other rechargeable batteries)
  • CHG: Battery charging pin (for charging the battery)
  • VBAT: Battery voltage monitoring pin (monitors battery level)
  • Wireless Programming and Debugging Pins
  • RX (UART_RX): Receive pin for serial communication (used for wireless programming and debugging)
  • TX (UART_TX): Transmit pin for serial communication (used for wireless programming and debugging)
  • DTR ( RTS): Data Terminal Ready pin (used for serial communication flow control)
  • CTS (CTS): Clear to Send pin (used for serial communication flow control)
  • Additional Features and Pins
  • BOOT: Boot mode select pin (pulling this pin low during power-up enables bootloader mode)
  • EN (Enable): Chip enable pin (pulling this pin low disables the ESP32)
  • RST (Reset): Reset pin (pulling this pin low resets the ESP32)
  • LED: Onboard LED pin (connected to a programmable GPIO pin)
  • Connecting the Pins
  • When connecting the pins on the Witty Fox - ESP32 Storm Board, follow these guidelines:
  • 1. Digital Pins (GPIO 0-15, 32-34): Use these pins as digital input/output pins or as specialty pins for specific functions (e.g., I2C, SPI, UART).
  • 2. Analog Input Pins (GPIO 16-27): Use these pins as analog input pins or as digital input/output pins.
  • 3. Power and Battery Management Pins: Connect the VIN pin to a power source (5V-12V), and connect the VOUT pin to power your project. Connect the BAT pin to a rechargeable battery, and use the CHG pin for charging the battery.
  • 4. Wireless Programming and Debugging Pins: Connect the RX, TX, DTR, and CTS pins to a serial communication interface (e.g., USB-to-TTL serial adapter) for wireless programming and debugging.
  • 5. Additional Features and Pins: Use the BOOT pin to enable bootloader mode, the EN pin to disable the ESP32, and the RST pin to reset the ESP32. The LED pin is connected to a programmable GPIO pin and can be used to indicate the board's status.
  • Remember to consult the Witty Fox - ESP32 Storm Board documentation and datasheets for specific usage guidelines and precautions when working with the board's pins.

Code Examples

Witty Fox - ESP32 Storm Board with Support for Battery Charging & Wireless Programming
Overview
The Witty Fox ESP32 Storm Board is a feature-rich, compact development board designed for IoT applications. It integrates the powerful ESP32 microcontroller, supporting Wi-Fi and Bluetooth connectivity, along with battery charging and wireless programming capabilities. This board is ideal for rapid prototyping and development of IoT projects, especially those requiring low-power wireless communication and autonomous operation.
Key Features
ESP32 microcontroller with Wi-Fi and Bluetooth capabilities
 Onboard USB-C port for programming and debugging
 Battery charging circuit with charging indicator LED
 Wireless programming support using the ESP32's built-in OTA (Over-The-Air) updates
 16MB of flash memory and 520KB of SRAM
 Operating voltage: 3.3V
 Compatible with various IoT development frameworks, including Arduino, MicroPython, and ESP-IDF
Code Examples
### Example 1: Wi-Fi Connection and Web Server (Arduino IDE)
In this example, we'll demonstrate how to connect the Witty Fox ESP32 Storm Board to a Wi-Fi network and create a simple web server using the Arduino IDE.
Hardware Requirements:
Witty Fox ESP32 Storm Board
 Micro-USB cable
 Computer with Arduino IDE installed
Code:
```cpp
#include <WiFi.h>
#include <WebServer.h>
const char ssid = "your_wifi_ssid";
const char password = "your_wifi_password";
WebServer server(80);
void setup() {
  Serial.begin(115200);
// Connect to Wi-Fi
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
  Serial.println("IP Address: ");
  Serial.println(WiFi.localIP());
// Start the web server
  server.begin();
}
void loop() {
  server.handleClient();
}
void handleRoot() {
  server.send(200, "text/html", "<h1>Hello from Witty Fox ESP32 Storm Board!</h1>");
}
```
Explanation:
1. Include the necessary libraries for Wi-Fi and web server functionality.
2. Define the Wi-Fi network credentials and create a `WebServer` object on port 80.
3. In `setup()`, connect to the Wi-Fi network and start the web server.
4. In `loop()`, handle incoming client requests.
5. The `handleRoot()` function serves a simple HTML page with a greeting message when the board's IP address is accessed in a web browser.
### Example 2: Bluetooth Low Energy (BLE) Advertising (MicroPython)
In this example, we'll demonstrate how to use the Witty Fox ESP32 Storm Board as a BLE advertiser using MicroPython.
Hardware Requirements:
Witty Fox ESP32 Storm Board
 Computer with MicroPython firmware installed on the board
Code:
```python
import ubluetooth
# Create a BLE adapter
bt = ubluetooth.BLE()
# Set the device name
bt.set_device_name("WittyFoxESP32")
# Create a BLE service
svc = bt.service(0x180F, True)  # Generic Attribute Profile
# Create a BLE characteristic
char = svc.characteristic(0x2902, True)  # Client Characteristic Configuration
# Start advertising
bt.start_advertising()
print("BLE advertising started")
```
Explanation:
1. Import the `ubluetooth` module, which provides BLE functionality.
2. Create a BLE adapter and set the device name.
3. Create a BLE service and characteristic using the Generic Attribute Profile.
4. Start advertising the BLE service.
Note: Make sure to install the necessary MicroPython firmware on the Witty Fox ESP32 Storm Board before running this example.
These examples demonstrate the versatility of the Witty Fox ESP32 Storm Board and its potential applications in IoT development.