Examples¶
84 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 |
|---|---|
ads1115.tc |
ADS1115 16-bit 4-Channel ADC Driver |
analog_clock.tc |
Analog clock with watchface background and dirty-rect hand erase |
benchmark.tc |
TinyC VM Benchmark |
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 |
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 |
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) |
display_demo.tc |
Sensor Dashboard for ILI9488 (480x320) |
dummy5.tc |
Dummy slot 4 driver — test 5th VM autoexec without serial |
dysv17f.tc |
DY-SV17F MP3 Player Driver (Serial TX) |
ecotracker.tc |
EcoTracker Emulator for Marstek battery systems (Jupiter, Venus, B2500) and Hoymiles (MS-A2) |
editor.tc |
TinyC - Hello World |
epaper29.tc |
EPaper 2.9" Display Controller & Data Logger |
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) |
fibonacci.tc |
Fibonacci sequence calculator |
file_io.tc |
File I/O demo — write and read back |
guiton_display.tc |
guiton_display.tc — LCD Energy Monitor |
heatpump_map.tc |
heatpump_map.tc — Modbus-RTU sniffer + control for chinese heat pumps |
homekit_demo.tc |
HomeKit Demo — Temperature sensor + Humidity sensor + Switch |
homekit_office.tc |
HomeKit Office — Color light + outlet + sensors via UDP |
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 |
ltr308.tc |
LTR-308ALS-01 Ambient Light Sensor Driver |
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 |
multipage_demo.tc |
Multi-Page WebUI Demo |
onewire.tc |
1-Wire Driver: Temperature Sensors + Output Switches |
powerwall.tc |
Powerwall — Tesla Powerwall API access |
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_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 |
sizeof_demo.tc |
sizeof_demo.tc — compile-time sizeof operator |
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_ebus.tc |
SML eBus Solar Monitor with 24h and weekly 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) |
sps30.tc |
SPS30 Particulate Matter Sensor Driver |
strings.tc |
String operations with char arrays |
sunton_display.tc |
Sunton 800x480 RGB Display — Home Energy Dashboard |
tcs34725.tc |
TCS34725 RGB Color Sensor Driver |
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 |
tuya_pool_heater.tc |
tuya_pool_heater.tc — Tuya v3.3 local-protocol client in TinyC |
udp.tc |
UDP multicast — share float variables between devices |
veml6075.tc |
VEML6075 UV Light Sensor Driver |
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 |
wav_player.tc |
WAV Player — I2S audio output with optional WM8960 codec |
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 |
webui_demo.tc |
WebUI Demo — Smart Relay Controller |