ormus-solutions/libreembed-claude-code/sensor-patterns
- community
Checking that the SKILL.md file is still in the repository.
Sensor patterns in embedded C: SPI register protocol, NTC thermistor conversion, multi-point calibration tables, median filters for spike rejection, and temperature compensation. Use when writing a sensor driver or cleaning up noisy readings.
Install
npx vskill@latest install ormus-solutions/libreembed-claude-code/sensor-patternsSKILL.md
sensor-patterns
Knowledge Base
Sensor driver, calibration, and filtering patterns for embedded C.
Pattern 1: SPI Sensor Register Protocol
Most SPI sensors use: CS assert → [address byte with R/W bit] → [data bytes] → CS deassert.
Pattern 2: Temperature Sensor with NTC Thermistor
NTC (Negative Temperature Coefficient) resistance decreases with temperature. Steinhart-Hart equation.
For higher accuracy: use a lookup table (LUT) generated from the datasheet R-T curve.
Pattern 3: Multi-Point Calibration with Lookup Table
For sensors with non-linear response, interpolate between calibration points.
Pattern 4: Median Filter for Spike Rejection
Median filter removes impulse noise (EMI spikes) without blurring edges.
Pattern 5: Temperature Compensation
Sensors drift with temperature. Compensate using a correction polynomial or lookup:
For highly accurate sensors (load cells, precision ADCs): use a 2D calibration matrix indexed by [temperature][load] with bilinear interpolation.
Anti-Patterns
- Reading sensor without checking DRDY (data ready) bit: reading before conversion complete returns stale or garbage data.
- Calibrating at a single point: single-point cal only corrects offset, not gain error. Always use at least two points.
- Moving average window too long: a 64-sample window at 100Hz = 640ms latency. Size the window to the acceptable response time.
- Not re-calibrating on temperature change: a sensor calibrated at 20°C may be 2-5% off at 60°C without compensation.
References
- BME280 datasheet (Bosch): register map section 4.2.3, compensation formula
- ICM-42688 datasheet (InvenSense): SPI protocol section 5.1
- Madgwick filter: sebastianmadgwick.com/downloads/MadgwickAndAHRSalgorithm.zip
- Maxim AN4691: NTC thermistor measurement techniques
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/sensor-integration/skills/sensor-patterns/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ormus-solutions/libreembed-claude-code/sensor-patterns)