styropyr0 / rev. 2026.10

Saurav Sajeev

I write firmware, device drivers, rendering code and, once, a Linux small enough to boot on a thumb-sized microcontroller. Most of what I build starts from a datasheet or a blank file rather than a framework: sensor drivers written register by register, a filesystem for a 4 KB EEPROM, shaders that refract whatever sits behind them. I like knowing what every layer underneath my code is doing, and I usually find out by writing that layer myself.

Most of my work is in C and C++. Outside of that, it's Kotlin and Java on Android, Go and Python on servers, and whatever the problem needs in between.

01Selected work

Linux on the XIAO RP2350

Operating system port · private

A Linux build cut down to fit the RISC-V side of the Seeed Studio XIAO RP2350. The RP2350's Hazard3 cores have no MMU, the board has 520 KB of on-chip SRAM, and there is no external PSRAM to fall back on, so every part of the image has to justify its size: kernel configuration, init, userspace and the boot path out of flash.

Target
RP2350, Hazard3 RV32
Memory
520 KB SRAM, no MMU
Storage
2 MB QSPI flash
Language
C, assembly

Xiao

Android app · closed source · on Google Play

A toolkit for testing connected hardware and network services from a phone. It talks BLE GATT, Bluetooth Classic RFCOMM, raw TCP and UDP, HTTP, WebSocket and MQTT, with typed payloads saved per device.

Beyond the client side it can play the other end of the conversation: a BLE peripheral emulator, an embedded Ktor HTTP server with SQLite, an HTTPS intercepting proxy with its own CA, an ADB client implemented over TCP/TLS without the adb binary, and an NFC reader/writer. Automations are built on a node canvas with conditions, loops and joins, and can be triggered by schedules, MQTT messages, BLE notifications or polled APIs.

Google Play Site Manual Issue tracker

Platform
Android 9+
Language
Kotlin
Protocols
BLE, RFCOMM, TCP, UDP, HTTP, WS, MQTT, NFC
Version
3.0.0

Visionary

Self-hosted observability · open source

Monitoring for APIs, servers and frontends: request logs, errors, uptime checks, alerting and host metrics, all stored in one SQL database the operator chooses (PostgreSQL, MySQL, SQLite or Cloudflare D1). Server SDKs for Go, Node, Python, Ruby, Java and .NET write directly to the database; browser, iOS and Android SDKs and any OTLP exporter post to the server.

A systemd host agent reports machine and container metrics plus security events like failed SSH logins. An analyst answers questions such as “why did p95 latency spike at 14:00” by running a bounded number of read-only SQL queries against Visionary's own tables, with IPs, headers and bodies masked before anything leaves the server.

Source

Language
Go, TypeScript
Storage
Postgres, MySQL, SQLite, D1
Ships as
OCI image, amd64 / arm64

Prismal & PrismalAGSL

Android rendering libraries · open source

Real-time “liquid glass” for Android: backdrop blur, edge refraction, chromatic aberration, Fresnel and specular terms, with spring-driven press interactions. The first version renders through OpenGL ES 2.0 for the View system. The second is a rewrite for Jetpack Compose on AGSL and RuntimeShader, which samples the backdrop inside the graphics pipeline instead of capturing it separately, so it is much lighter on GPU and memory. It falls back gracefully on devices without AGSL.

Working on it led to writing an AGSL grammar for syntax highlighting and proposing AGSL as a language to GitHub Linguist.

Prismal (GLES) PrismalAGSL language-agsl

Language
Kotlin, GLSL, AGSL
Min SDK
25
Stars
100+ combined

MjolnFS

Filesystem for I²C EEPROM · open source

A small structured filesystem for AT24C-series EEPROMs, from 4 KB to 512 KB parts. Create, read, rename, delete and list files, with a versioned on-disk format: mounting checks the boot sector and refuses images it doesn't understand rather than guessing. Includes a serial shell for poking at the volume by hand. Published in the Arduino Library Manager.

Source

Language
C++
Bus
I²C
Format
On-disk v2

Imaging with an optical mouse sensor

Hardware experiment · open source

An optical mouse is a tiny camera. Reading the MX8650's registers directly over its serial interface exposes the raw pixel array, which I rendered to a display as an image. The same frame data turned out to be sensitive enough to detect small vibrations, so the sensor doubles as a crude interferometer. The register access later became a standalone driver library.

Experiment Library

Language
C++
Hardware
MX8650, SPI display

02Drivers and embedded libraries

Written from datasheets, register by register. Most are published in the Arduino Library Manager; the RP2350 ones use the Pico SDK.

LibraryDeviceInterfaceNotes
oled.hSSD1306 OLEDI²CScene graph of reusable drawables (Fragments, GridView), Unicode fonts, animated text, live plots (pulse, bar, scatter, histogram), four bus-speed power modes. Ships with a Python image-to-bitmap converter.
SSD1306_RP2350SSD1306 OLEDI²C over PIORewrite for the RP2350 with I²C driven by a PIO state machine and runtime clock-divider changes. Reaches 40+ fps in turbo mode; includes a rotating 3D cube demo.
RP2350-RGB-DriverWS2812PIOWS2812 bit timing generated in PIO. Small serial protocol with a handshake, so a host app (ColorMod) or any terminal can set channels.
MX8650Optical mouse sensor3-wire SPIHalf-duplex SDIO register access, motion deltas and sensor configuration. Documents the ESP8266 bus-contention problem and its resistor fix.
APDS9960Light / colour / proximity / gestureI²CAll four engines: ambient light, RGBC colour, proximity with offsets, and directional gesture decoding. Per-engine interrupts, gain and LED drive.
BME688Gas, humidity, pressure, temperatureI²CCompensated readings from the on-chip calibration data, oversampling per channel, forced and parallel modes, and configurable gas-heater profiles.
BMP180Pressure, temperatureI²CPressure, temperature and altitude with oversampling. Converts between °C/°F/K, Pa/psi/bar/inHg/atm and metres/feet.
ADS111SADS1113 / 1114 / 1115 ADCI²CSingle-ended and differential inputs, PGA ranges, 8–860 SPS, single-shot or continuous, and the threshold comparator with polarity and latching.
MPM10Particulate matterI²C, UARTPM1.0, PM2.5 and PM10 in µg/m³ plus particle counts per sample volume, over either transport. Standard or atmospheric measurement context.
ML8511UV sensorAnalogUV intensity in several units and the UV index, with oversampling and user calibration. Runs on AVR, ESP32, RP2040, STM32 and SAM3X8E.
MAX7219LED matrix / 7-segmentSPIDecode modes, intensity, scan limit, shutdown and test modes, and pixel, column or digit writes. Also estimates the chip's power dissipation.
SensorHubShared bus layerI²C, I²SThe transport the sensor drivers build on: single and multi-byte transfers, endianness handling and presence checks, plus I²S ADC capture on the ESP32.
WizerESP32 / ESP8266 Wi-Fi—On-device network diagnostics: RSSI-based signal score, latency and jitter, HTTP checks, rough bandwidth, captive portal detection and a signal history exportable as JSON.
JSON_Encoder——URL-encodes and decodes JSON so it can travel in query strings from boards without a JSON stack.

03Android libraries

04Tools and infrastructure