Skip to content

Examples

186 example programs covering sensors, displays, networking, and device drivers.

Source lives in tasmota/tinyc/examples/. Pre-compiled bytecode is available from the in-device program repository (TinyCChkpt → Download).

Example Summary
a7105_fsync.tc a7105_fsync.tc — channel scan using A7105's FSYNC hardware signal.
a7105_gm24g.tc a7105_gm24g.tc — A7105 receiver template with datasheet-correct
a7105_listen.tc a7105_listen.tc — background FIFO RX. EveryLoop drains FIFO when packets
a7105_probe.tc a7105_probe.tc — AMICCOM A7105 alive-check (SPI register R/W round-trip)
a7105_scan.tc a7105_scan.tc — AMICCOM A7105 RSSI-scan + init for ceiling-lamp sniffer.
ads1115.tc ADS1115 16-bit 4-Channel ADC Driver
analog_clock.tc Analog clock with watchface background and dirty-rect hand erase
audio_io.tc audio_io.tc — simultaneous WAV PLAYBACK + MIC READ from one TinyC app, full-duplex.
benchmark.tc TinyC VM Benchmark
ble_scan.tc ble_scan.tc — BLE advertisement scanner for TinyC.
ble_server.tc ble_server.tc — TinyC BLE GATT server (peripheral / "device-as-peripheral").
blib_crc_demo.tc blib_crc_demo.tc — exercise xblib_01_crc via bcall().
blink.tc Blink LED on pin 8 (classic Arduino blink)
bme280.tc BME280 Temperature, Humidity & Pressure Sensor Driver
bmp280.tc BMP280 Temperature & Pressure Sensor Driver
bmx280.tc BMx280 Temperature, Pressure & (optional) Humidity Sensor Driver
bresser.tc Bresser Weather Station Receiver (CC1101 868 MHz)
bresser_chart.tc Bresser Weather Station + 24h Google Charts (CC1101 868 MHz)
c_extensions_demo.tc c_extensions_demo.tc
callback_test.tc callback_test.tc — regression test for the callback dispatch cache
callbacks.tc Callback functions — Tasmota integration
camera.tc ESP32 Camera — TinyC direct esp_camera driver
can_sniffer.tc CAN bus sniffer — empfängt alle Frames auf dem Bus und loggt sie
ccs811.tc CCS811 Digital Air Quality Sensor (eCO2 + TVOC)
chart.tc Google Line Chart — 1000 data points stored in array
chart_types.tc Chart Types Demo — shows all supported WebChart types
clock_7seg.tc clock_7seg.tc — big 7-segment HH:MM wall clock, multiplexed with fastMux().
clock_header.tc clock_header.tc — reusable WebUI clock header
core2_energy.tc Core2 Energy Monitoring System — PHASE 5: global keyword
crypto_test.tc crypto_test.tc — sanity-check the AES + SHA syscalls (TinyC ≥ 1.3.20)
daikin_control.tc daikin_control.tc — dedicated controller for Daikin WiFi A/C units
device_scanner.tc device_scanner.tc — home Tasmota fleet health monitor (v2: auto-discovery).
deye.tc deye.tc — Rolf's Deye hybrid-inverter Modbus reader (.198) + go-e wallbox
display_demo.tc Sensor Dashboard for ILI9488 (480x320)
dmx_dimmer_panel.tc dmx_dimmer_panel.tc — minimal DMX512 test panel.
dummy5.tc Dummy slot 4 driver — test 5th VM autoexec without serial
dyson_tp02.tc dyson_tp02.tc — local control of a Dyson Pure Cool Link (Tower TP02 / Desk DP01 …)
dysv17f.tc DY-SV17F MP3 Player Driver (Serial TX)
ebus_clock_write.tc ebus_clock_write.tc — .39 eBUS active-master WRITE test (Mac<->.39 UART harness).
ecotracker.tc EcoTracker Emulator — Marstek, Hoymiles, Jackery, NOAH
ecotracker_shelly_emu.tc Unified PV-battery meter emulator — EcoTracker + Shelly Pro 3EM
editor.tc TinyC - Hello World
energy_dashboard.tc energy_dashboard.tc — house-wide energy / climate dashboard
epaper29.tc EPaper 2.9" Display Controller & Data Logger
epaper42.tc epaper42.tc — 4.2" e-paper full-house dashboard.
epaper_clock_test.tc epaper_clock_test.tc — minimal partial-update repro for EPD 2.9"
epd_compare_test.tc E-Paper A/B Visual Comparison Test (PORTRAIT 128 x 296)
epd_ssd1680_test.tc SSD1680 3-wire SPI test driver (Waveshare 2.9" v2, 128x296)
esf37_probe.tc esf37_probe.tc — GATT subscribe-notify probe for the Etekcity ESF37 scale
esf37_scale.tc esf37_scale.tc — read the Etekcity ESF37 body-composition scale over BLE (plaintext)
esf37_speak.tc esf37_speak.tc — Etekcity ESF37 BLE scale → SPEAK the weight in German (picotts).
fast_mux.tc fast_mux.tc — HW-timer GPIO multiplexer (ported from Scripter's ESP32_FAST_MUX).
fibonacci.tc Fibonacci sequence calculator
file_io.tc File I/O demo — write and read back
globals_toctou_soak.tc globals_toctou_soak.tc — stress the UDP-global receive path (the
gpio_sweep.tc GPIO sweep — togglt jeden freien ESP32-C3 GPIO der Reihe nach,
gpio_toggle_test.tc GPIO toggle diagnostic — togglt einen Pin im 1-Hz-Takt (500ms HIGH / 500ms LOW)
growatt.tc growatt.tc — gemu's Growatt-inverter Modbus reader + feed-in control
guiton_display.tc guiton_display.tc — LCD Energy Monitor
heatpump_map_full.tc heatpump_map.tc — Modbus-RTU sniffer + control for chinese heat pumps
heatpump_test.tc heatpump_test.tc — bare-bones heatpump Modbus sniffer (2026-05-11, threaded)
homekit_demo.tc HomeKit Demo — Temperature sensor + Humidity sensor + Switch
homekit_office.tc HomeKit Office — Color light + outlet + sensors via UDP
hourly_chime.tc hourly_chime.tc — play a sound file at the top of every full hour
igmp_leave_smoke.tc IGMP-Leave Smoke-Test für den neuen udp(10, mcast_ip) Syscall (TC 1.6.1).
jpg_on_canvas.tc jpg_on_canvas.tc — compose a JPG + procedural overlay into one canvas,
lcd_chart.tc lcd_chart.tc — 3-Channel Line Chart Demo for TinyC
lcd_i2c.tc lcd_i2c.tc — I2C LCD Character Display Driver (HD44780 + PCF8574)
ld2410.tc HLK-LD2410 24GHz mmWave Human Presence Sensor
ledbar.tc LEDBAR — WS2812 position indicator with IR lamp control
live_chart.tc Live Moving Line Chart — demonstrates _Q() macro for Google Charts
loudness.tc loudness.tc — microphone loudness / VU meter using the TinyC I2S mic (RX) syscalls.
loudness_gauge.tc loudness_gauge.tc — plugin-INDEPENDENT sound I/O demo for the Waveshare ESP32-P4 10.1".
loudness_p4.tc loudness_p4.tc — mic loudness/VU meter for the Waveshare ESP32-P4 10.1" board.
ltr308.tc LTR-308ALS-01 Ambient Light Sensor Driver
lvgl_chart.tc lvgl_chart.tc — LVGL Phase 3 demo (requires firmware with USE_TINYC_LVGL)
lvgl_demo.tc lvgl_demo.tc — LVGL Phase 1 demo (requires firmware built with USE_TINYC_LVGL)
lvgl_panel.tc lvgl_panel.tc — a multi-screen LVGL app for TinyC (requires firmware with USE_TINYC_LVGL)
lvgl_smoke.tc lvgl_smoke.tc — LVGL Phase 0 smoke test (requires firmware built with USE_TINYC_LVGL)
lvgl_widgets.tc lvgl_widgets.tc — LVGL Phase 2 demo (requires firmware with USE_TINYC_LVGL)
m5_epd47.tc m5_epd47.tc — M5Paper EPD-47 house dashboard (port of Scripter source)
mail_test.tc mail_test.tc — minimal SMTP test for debugging the mailSend crash.
matter_airquality.tc Matter Air Quality sensor — CO2 / PM2.5 / TVOC (Matter 1.4).
matter_battery.tc Matter battery (Power Source cluster 0x002F, BAT feature) — real battery level.
matter_bridge.tc Matter Bridge — ONE Matter node exposing MANY devices (pure TinyC).
matter_bridge_ui.tc matter_bridge_ui.tc — interactive remote-device bridge for matter_c (Berry-style).
matter_button.tc Matter Generic Switch (stateless programmable button) — uses Matter EVENTS.
matter_fake_sensors.tc Matter "fake" sensors — surface UNSUPPORTED quantities through SUPPORTED tiles.
matter_fan.tc Matter Fan — Home controls the speed by WRITING the PercentSetting attribute.
matter_home_alexa.tc Matter Home — Alexa edition (slimmed bridge).
matter_home_bridge.tc Matter Home Bridge — TinyC port of the HomeKit "script-3" scripter.
matter_leak.tc Matter Water-Leak + Rain sensors (BooleanState).
matter_plug.tc Matter Smart Plug + live Power sensor — defined entirely in TinyC.
matter_powermeter.tc Matter 1.4 Power + Energy Meter — expose an SML meter over Matter.
matter_remote_bridge.tc matter_remote_bridge.tc — bridge ANOTHER Tasmota ESP's sensors + actuators
matter_rgb.tc Matter Smart Plug + RGB Color Light — pure TinyC on an ESP32-C6.
matter_sensors.tc Matter environmental sensors — Temperature + Humidity + Pressure (pure TinyC).
matter_shutter.tc Matter Window Covering (roller shutter / blind).
max31855.tc MAX31855 Thermocouple Sensor Driver (SPI)
meter_pin_unlock.tc Smart-Meter Optical PIN Unlocker (eHZ / IEC 62056-21 InF)
mlx90614.tc MLX90614 Infrared Non-Contact Thermometer Driver
modbus_lib.tc modbus_lib.tc — Modbus TCP helpers for TinyC (v1.6.0+)
multipage_demo.tc Multi-Page WebUI Demo
music_fft.tc music_fft.tc — "wrapped FFT" music player: a ring of spectrum bars radiating AROUND
music_ui.tc music_ui.tc — a TinyC-LVGL "music player" screen, inspired by LVGL's lv_demo_music.
onewire.tc 1-Wire Driver — Temperature Sensors + Output Switches
persist_array_file.tc persist_array_file.tc — script-managed persistence for arrays that
pool_pump.tc pool_pump.tc — Tuya local-protocol client for a "Swimming Pool Heat Pump"
power_meter.tc power_meter.tc — energy-metering smart plug power + consumption charts
powerwall.tc Powerwall — Tesla Powerwall API access
powerwall_fast.tc Powerwall (FAST variant) — experimental higher-throughput poll
rgb_led.tc Onboard RGB LED demo — WS2812/SK6812 driven directly off the RMT peripheral.
rgb_selftest.tc RGB self-test — drives the SAME pipeline a Matter ColorControl command would:
scd30.tc SCD30 CO2/Temperature/Humidity Sensor Driver
sensor_read.tc Read analog sensor and display via serial
sgp30.tc SGP30 VOC/eCO2 Sensor Driver
share_dump_test.tc shareDump() smoke test — TC 1.6.2
share_key_test.tc share_key_test.tc — verify shareSetFloatKey (runtime char[] key).
share_reader.tc Slot 1: reads cross-VM share keys written by slot 0 (share_writer.tc).
share_writer.tc Slot 0: writes counter / kwh / name to the cross-VM share table every second.
sht31.tc SHT31 Temperature & Humidity Sensor Driver
sht31_publisher.tc sht31_publisher.tc — SHT31 sensor that publishes to UDP globals
sht31_th.tc SHT31 Temp & Humidity — tc2plugin PoC test variant (T+H only)
sizeof_demo.tc sizeof_demo.tc — compile-time sizeof for struct types
slcan_bridge.tc slcan_bridge.tc — USB-serial ↔ CAN-bus bridge using the SLCAN
slcan_bridge_tcp.tc slcan_bridge_tcp.tc — SLCAN bridge over TCP (WiFi).
slot0_test.tc Slot 0 test — Counter A (increments every second)
slot1_test.tc Slot 1 test — Counter B (increments by 10 every second)
slot2_test.tc Slot 2 test — Counter C (counts down from 1000)
slot3_test.tc Slot 3 test — Counter D (toggles 0/1 every second)
sma_speedwire.tc SMA Home Manager 2.0 Speedwire receiver
sml_chart.tc sml_chart.tc — single-meter SML reader with 4h/24h power charts +
sml_chart_bezug.tc sml_chart_bezug.tc — SML reader for meters with no feed-in counter
sml_chart_common.tc sml_chart_common.tc — shared chart + descriptor helpers for SML scripts
sml_chart_modbus.tc sml_chart_modbus.tc — sml_chart_pv + Modbus-TCP slave server
sml_chart_pv.tc sml_chart_pv.tc — SML reader with PV-production tracking + charts
sml_chart_pv_common.tc sml_chart_pv_common.tc — PV-production helpers shared by the PV variants
sml_custom_line.tc sml_custom_line.tc — two SML web-table techniques.
sml_descriptor.tc sml_descriptor.tc — SML descriptor + pin management helpers
sml_ebus.tc SML eBus Solar Monitor with 24h and weekly charts
sml_enable.tc sml_enable.tc — minimal: turn on the SML descriptor gate (Rule1 / tasm_rule).
sml_simple.tc sml_simple.tc — minimal SML smart-meter reader & descriptor manager
sml_water.tc sml_water.tc — water-meter (pulse counter, Reed contact / S0) with charts
snap_with_timestamp.tc snap_with_timestamp.tc
sort.tc Bubble sort an array of integers
spawn_tasks.tc spawn_tasks.tc — Dynamic FreeRTOS task spawn demo (ESP32 only)
sprintf_crash_test.tc Minimal repro for the Exception 29 / tlsf_free NULL crash that
sps30.tc SPS30 Particulate Matter Sensor Driver
strings.tc String operations with char arrays
structs_demo.tc structs_demo.tc — practical struct patterns (TinyC 1.4.0+)
sunton_display.tc Sunton 800x480 RGB Display — Home Energy Dashboard
tcs34725.tc TCS34725 RGB Color Sensor Driver
test_2d.tc test_2d.tc — Phase 1 2D-char-array smoke test
test_2d_phase2.tc test_2d_phase2.tc — Phase 2 additions over Phase 1
test_fnptrs_v1.tc test_fnptrs_v1.tc — function pointers v1 (Phase B) probe
test_fnptrs_v2.tc test_fnptrs_v2.tc — fn-ptrs as struct fields (Phase B v2 probe)
test_refparams_v1.tc test_refparams_v1.tc — reference parameters (Phase A v1) probe
test_strings_v15.tc test_strings_v15.tc — TinyC 1.5.0 string-ops probe
test_structs_v1.tc test_structs_v1.tc — probe what works in the IDE's existing struct
text_on_image.tc text_on_image.tc — Flicker-free text overlay on JPEG background
tinyui_dashboard.tc tinyui_dashboard.tc — polished 3-screen dashboard, TinyUI aesthetics showcase
tinyui_demo.tc tinyui_demo.tc — demo of the TinyUI retained-mode widget layer
touch_buttons.tc Touch Button & Slider Demo
touch_coords.tc touch_coords.tc — live touch coordinates on the LVGL screen.
tuya_pool_heater.tc tuya_pool_heater.tc — Tuya v3.3 local-protocol client in TinyC
uart_tx_test.tc UART TX continuous burst test for oscilloscope verification.
udp.tc UDP multicast — share float variables between devices
veml6075.tc VEML6075 UV Light Sensor Driver
vesync_scale_sniff.tc vesync_scale_sniff.tc — does the Etekcity ESF37 broadcast weight in its advertisement?
vl53l0x.tc vl53l0x.tc — VL53L0X Time-of-Flight distance sensor driver
voltmeter.tc voltmeter.tc — procedurally-drawn analog voltmeter with dirty-rect needle
voltmeter2.tc voltmeter2.tc — smooth-sweep analog gauge using the TinyC canvas API.
voltmeter_multi.tc voltmeter_multi.tc — three gauges on one screen, driven by struct + array
watch_demo.tc Watch Variables Demo
watch_renaissance.tc watch_renaissance.tc — analog "Waldhoff Renaissance" watchface for a 240x240 screen.
wav_player.tc WAV Player — plugin-independent I2S audio output, selectable codec.
wd_logger.tc wd_logger.tc — indoor air-quality logger, TinyC port of the Tasmota Scripter "wd".
web_buttons.tc web_buttons.tc — Custom Web Buttons Demo
web_handler.tc Custom Web Handler Demo
webcall_demo.tc WebCall Demo — Widgets on the Tasmota main page
webcam.tc Webcam Security Camera Script
webcam_tinyc.tc webcam_tinyc.tc — Security Camera using TinyC integrated cam driver
webradio.tc webradio.tc — Internet-radio player for an I2S audio board.
webui_demo.tc WebUI Demo — Smart Relay Controller
webui_dynamic.tc webui_dynamic.tc — demo of the TinyC dynamic-HTML enablers (1.6.31).
webui_watchdog.tc webui_watchdog.tc — auto-recover from the "Tasmota WebUI dies but