# loom > Reusable C drivers and algorithms for embedded systems. Every unit is pinned by source commit and SHA-256. ## For AI agents - Read https://git.pcbsmt.me/rh/emb-loom/raw/branch/main/AGENTS.md before changing the catalog. - Search `loom.json` and the unit folders before writing. Reuse or extend an adapter; do not create a near-duplicate. - Scaffold with `node tools/loom/new-unit.mjs --kind driver|operator`. - Do not copy GPL or vendor source. Cite the real behavior reference and license. - Run `make test` and `node tools/loom/check-catalog.mjs`. Report unverified bench behavior. - Do not tag, bump the catalog version, or commit generated `site/dist`. ## Catalog - [clamp](https://loom.pcbsmt.me/units/clamp.html) — Limit sample-to-sample change. (operator, 0.1.0) - [median](https://loom.pcbsmt.me/units/median.html) — Remove impulses with an N-sample median. (operator, 0.1.0) - [moving-average](https://loom.pcbsmt.me/units/moving-average.html) — Smooth with an N-sample mean. (operator, 0.1.0) - [ema](https://loom.pcbsmt.me/units/ema.html) — First-order lag with a power-of-two shift. (operator, 0.1.0) - [trimmed-mean](https://loom.pcbsmt.me/units/trimmed-mean.html) — Average a batch after dropping the minimum and maximum. (operator, 0.1.0) - [debounce](https://loom.pcbsmt.me/units/debounce.html) — Delay a binary change until the input is stable. (operator, 0.1.0) - [hysteresis](https://loom.pcbsmt.me/units/hysteresis.html) — Keep a binary state across a threshold band. (operator, 0.1.0) - [key-fsm](https://loom.pcbsmt.me/units/key-fsm.html) — Turn a key level into short and long events. (operator, 0.1.0) - [crc16](https://loom.pcbsmt.me/units/crc16.html) — CRC-16/CCITT-FALSE for frames and images. (operator, 0.1.0) - [ring-buffer](https://loom.pcbsmt.me/units/ring-buffer.html) — Fixed-size byte ring buffer. (operator, 0.1.0) - [mean](https://loom.pcbsmt.me/units/mean.html) — Arithmetic mean of a batch. (operator, 0.1.0) - [clamp-average](https://loom.pcbsmt.me/units/clamp-average.html) — Limit each step, then smooth with a moving average. (operator, 0.1.0) - [weighted-average](https://loom.pcbsmt.me/units/weighted-average.html) — Weighted mean of a batch. (operator, 0.1.0) - [clamp-debounce](https://loom.pcbsmt.me/units/clamp-debounce.html) — Limit each step, then accept after N stable samples. (operator, 0.1.0) - [ir-nec-decode](https://loom.pcbsmt.me/units/ir-nec-decode.html) — Decode NEC falling-edge intervals. (operator, 0.1.0) - [i2c-master](https://loom.pcbsmt.me/units/i2c-master.html) — Blocking I2C master with a port and fake bus. (driver, 0.1.0) - [uart](https://loom.pcbsmt.me/units/uart.html) — Blocking UART core with a port and timeout. (driver, 0.1.0) - [ws2812](https://loom.pcbsmt.me/units/ws2812.html) — Encode RGB pixels into WS2812 GRB bytes. (driver, 0.1.0) - [ir-capture](https://loom.pcbsmt.me/units/ir-capture.html) — Collect falling-edge intervals for an IR receiver. (driver, 0.1.0) - [pid](https://loom.pcbsmt.me/units/pid.html) — Integer PID with integral clamping and output limits. (operator, 0.1.0) - [gamma-lut](https://loom.pcbsmt.me/units/gamma-lut.html) — Map an input through a lookup table with interpolation. (operator, 0.1.0) - [crc32](https://loom.pcbsmt.me/units/crc32.html) — CRC-32/ISO-HDLC for images and frames. (operator, 0.1.0) - [fixed-sqrt](https://loom.pcbsmt.me/units/fixed-sqrt.html) — Q16.16 integer square root. (operator, 0.1.0) - [adc-sampler](https://loom.pcbsmt.me/units/adc-sampler.html) — Average N ADC reads on a channel. (driver, 0.1.0) - [soft-pwm](https://loom.pcbsmt.me/units/soft-pwm.html) — Software PWM on a single pin. (driver, 0.1.0) - [ds18b20](https://loom.pcbsmt.me/units/ds18b20.html) — READ DS18B20 temperature over 1-Wire. (driver, 0.1.0) - [biquad](https://loom.pcbsmt.me/units/biquad.html) — Q15 direct-form I biquad section. (operator, 0.1.0) - [ssd1306](https://loom.pcbsmt.me/units/ssd1306.html) — Minimal SSD1306 128x64 I2C driver. (driver, 0.1.0) - [dht](https://loom.pcbsmt.me/units/dht.html) — DHT11 and DHT22 frame decoders. (driver, 0.1.0) - [rotary-encoder](https://loom.pcbsmt.me/units/rotary-encoder.html) — Quadrature decoder for a mechanical rotary encoder. (driver, 0.1.0) - [fir](https://loom.pcbsmt.me/units/fir.html) — Q15 finite-impulse-response filter. (operator, 0.1.0) - [at24cxx](https://loom.pcbsmt.me/units/at24cxx.html) — AT24Cxx I2C EEPROM driver. (driver, 0.1.0) - [ds3231](https://loom.pcbsmt.me/units/ds3231.html) — DS3231 I2C real-time clock. (driver, 0.1.0) - [max7219](https://loom.pcbsmt.me/units/max7219.html) — MAX7219/MAX7221 SPI LED driver. (driver, 0.1.0) - [pca9685](https://loom.pcbsmt.me/units/pca9685.html) — PCA9685 16-channel I2C PWM driver. (driver, 0.1.0) - [mpu6050](https://loom.pcbsmt.me/units/mpu6050.html) — MPU-6050 six-axis IMU driver. (driver, 0.1.0) - [sht3x](https://loom.pcbsmt.me/units/sht3x.html) — SHT30/SHT31/SHT35 temperature and humidity sensor. (driver, 0.1.0) - [aht20](https://loom.pcbsmt.me/units/aht20.html) — AHT20 temperature and humidity sensor. (driver, 0.1.0) - [mcp2515](https://loom.pcbsmt.me/units/mcp2515.html) — MCP2515 CAN controller over SPI. (driver, 0.1.0) - [stepper](https://loom.pcbsmt.me/units/stepper.html) — Step/direction stepper driver for A4988 and DRV8825. (driver, 0.1.0) - [hx711](https://loom.pcbsmt.me/units/hx711.html) — HX711 24-bit load-cell amplifier. (driver, 0.1.0) - [max31855](https://loom.pcbsmt.me/units/max31855.html) — MAX31855 thermocouple amplifier. (driver, 0.1.0) - [bme280](https://loom.pcbsmt.me/units/bme280.html) — BME280 temperature, pressure, and humidity sensor. (driver, 0.1.0) - [adxl345](https://loom.pcbsmt.me/units/adxl345.html) — ADXL345 three-axis accelerometer. (driver, 0.1.0) - [mcp23017](https://loom.pcbsmt.me/units/mcp23017.html) — MCP23017 16-bit I2C GPIO expander. (driver, 0.1.0) - [ads1115](https://loom.pcbsmt.me/units/ads1115.html) — ADS1115 16-bit I2C analog-to-digital converter. (driver, 0.1.0) - [sh1106](https://loom.pcbsmt.me/units/sh1106.html) — Minimal SH1106 128x64 I2C OLED driver. (driver, 0.1.0) - [mcp4725](https://loom.pcbsmt.me/units/mcp4725.html) — MCP4725 12-bit I2C digital-to-analog converter. (driver, 0.1.0) - [pcf8574](https://loom.pcbsmt.me/units/pcf8574.html) — PCF8574 8-bit I2C GPIO expander. (driver, 0.1.0) - [hc-sr04](https://loom.pcbsmt.me/units/hc-sr04.html) — HC-SR04 ultrasonic distance sensor. (driver, 0.1.0) - [ina219](https://loom.pcbsmt.me/units/ina219.html) — INA219 high-side current and power monitor. (driver, 0.1.0) - [mcp9808](https://loom.pcbsmt.me/units/mcp9808.html) — MCP9808 high-accuracy I2C temperature sensor. (driver, 0.1.0) - [nrf24l01](https://loom.pcbsmt.me/units/nrf24l01.html) — nRF24L01+ 2.4 GHz SPI transceiver core. (driver, 0.1.0) - [hd44780](https://loom.pcbsmt.me/units/hd44780.html) — HD44780-compatible character LCD, 4-bit parallel interface. (driver, 0.1.0) - [mfrc522](https://loom.pcbsmt.me/units/mfrc522.html) — MFRC522 13.56 MHz RFID reader over SPI. (driver, 0.1.0) - [modbus-rtu](https://loom.pcbsmt.me/units/modbus-rtu.html) — Modbus RTU frame builder and parser. (operator, 0.1.0) - [pir](https://loom.pcbsmt.me/units/pir.html) — PIR motion detector signal chain for sampled pyroelectric data. (operator, 0.1.0) - [scd4x](https://loom.pcbsmt.me/units/scd4x.html) — Sensirion SCD40/SCD41 CO2, temperature, and humidity sensor. (driver, 0.1.0) - [sdcard](https://loom.pcbsmt.me/units/sdcard.html) — SD card block device over SPI. (driver, 0.1.0) ## Registry - [index.json](https://loom.pcbsmt.me/index.json) - [Documentation](https://loom.pcbsmt.me/docs.html) - [Examples](https://loom.pcbsmt.me/examples.html) - [Compatibility](https://loom.pcbsmt.me/tests.html) - [Request a package](https://loom.pcbsmt.me/request.html) - [Source](https://git.pcbsmt.me/rh/emb-loom) - [Catalog ref](https://git.pcbsmt.me/rh/emb-loom/src/tag/v0.22.0)