Sonoff TH

Hardware

Platform Espressif 8266: Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications.

Microcontroller ESP8266
Frequency 80MHz
Flash 1MB
RAM 80KB
Vendor ITEAD

Configuration

Please use sonoff_th ID for board option in “platformio.ini” (Project Configuration File):

[env:sonoff_th]
platform = espressif8266
board = sonoff_th

You can override default Sonoff TH settings per build environment using board_*** option, where *** is a JSON object path from board manifest sonoff_th.json. For example, board_build.mcu, board_build.f_cpu, etc.

[env:sonoff_th]
platform = espressif8266
board = sonoff_th

; change microcontroller
board_build.mcu = esp8266

; change MCU frequency
board_build.f_cpu = 80000000L

Uploading

Sonoff TH supports the next uploading protocols:

  • espota
  • esptool

Default protocol is esptool

You can change upload protocol using upload_protocol option:

[env:sonoff_th]
platform = espressif8266
board = sonoff_th

upload_protocol = esptool

Debugging

PIO Unified Debugger currently does not support Sonoff TH board.

Frameworks

Name Description
Arduino Arduino Wiring-based Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.
ESP8266 Non-OS SDK The non-OS SDK provides a set of application programming interfaces (APIs) for core ESP8266 functionalities such as data reception/transmission over Wi-Fi, TCP/IP stack functions, hardware interface functions and basic system management functions.
ESP8266 RTOS SDK ESP8266 SDK based on FreeRTOS, a truly free professional grade RTOS for microcontrollers