Examples

A collection of example projects provided with the WCH PlatformIO platform. These demonstrate usage of various chips, frameworks, and peripherals.

ADC

  • adc-cpu-temp-none-os: Read internal CPU temperature using ADC (WCH SDK).

  • adc-simple-none-os: Basic ADC example using WCH SDK.

Baremetal

  • baremetal-ch32v003: Minimal example for CH32V003 with no framework.

Bluetooth Low Energy (BLE)

  • ble-hid-ch32v208: BLE HID device example for CH32V208.

  • ble-hid-ch59x: BLE HID example for CH59x series.

  • ble-usb-cdc-ch58x: BLE + USB CDC combo device using CH58x.

Blinky

  • blinky-arduino: Simple LED blink using Arduino framework.

  • blinky-arduino-ch32v003: Arduino blink example for CH32V003.

  • blinky-arduino-ch32v307: Arduino blink for CH32V307.

  • blinky-arduino-tinyusb: Arduino blink with TinyUSB support.

  • blinky-ch32v003fun: Blink example using CH32V003Fun SDK.

  • blinky-cpp-none-os: Blink using C++ (WCH SDK).

  • blinky-freertos: Blink task using FreeRTOS.

  • blinky-freertos-ch58x-ch59x: FreeRTOS blink for CH58x/CH59x.

  • blinky-none-os: Blink using WCH SDK.

  • blinky-none-os-ch5xx: WCH SDK blink for CH5xx series.

  • blinky-none-os-ch6xx: WCH SDK blink for CH6xx series.

CH32Fun

  • ch32fun-blink: Blink using the CH32Fun minimal HAL.

  • ch32fun-oled: OLED display demo with CH32Fun.

Hello World

  • hello-world-harmony-liteos: Hello World using Huawei Harmony LiteOS.

  • hello-world-rt-thread: Hello World on RT-Thread RTOS.

  • hello-world-rt-thread-ch5xx: RT-Thread Hello World for CH5xx.

  • hello-world-tencent-os: Hello World with TencentOS tiny.

Miscellaneous

  • sdi-printf-ch32v003: SDI console printf for CH32V003.

  • tinyusb-arduino: TinyUSB + Arduino stack demo.

  • uart-printf-none-os: UART printf using WCH SDK.

  • usb-cdc-wch32v307-none-os: USB CDC device on CH32V307 (WCH SDK).

USB Power Delivery

  • usb-pd-none-os: USB Power Delivery sink demo using WCH SDK.

  • usb-pd-none-os-ch641: USB PD on CH641 with WCH SDK.

  • usb-pdf-logger-none-os-ch592: USB PD debug logger for CH592 using WCH SDK.

Webserver

  • webserver-ch32v307-none-os: Ethernet webserver for CH32V307 using WCH SDK.

Zephyr

  • zephyr-blink: LED blink using the Zephyr RTOS.