rawmeat.org

Code, craft, creating

AHT20 update, and my open source experience

2025-06-20 3 min read Making Code

It’s been more than two years since I released my AHT20-driver (a Rust driver for a temperature and humidity sensor). I’ve had a lot of support and friendly interactions as a result, and I’d like to highlight what a pleasant experience it’s been.

The AHT20 sensor is a temperature and humidity sensor by the company Asair. I used the Adafruit AHT20 board during development. The driver is written in Rust, which I’ve come to really enjoy programming in.

Continue reading

AHT20 thermometer driver

2022-01-30 18 min read Making Code

I wrote a new driver for the AHT20 temperature and humidity sensor in Rust. This is a continuation of my Barometer build article, where I re-use the lps25_pressure_sensor_demo project to add a temperature sensor on the with_aht20_sensor branch.

project photo

I’m a complete novice at Rust and embedded programming. These projects are my attempts to learn more about both while having fun and making something useful.

You can find the driver at:

If you have an I2C device and delay configured, this is how you use the driver:

Continue reading

Barometer build

2021-12-26 11 min read Making Code

I put together a barometer, built around Adafruit’s LPS25 breakout board, the Blue Pill microcontroller, and a small 16x2 character LCD panel. It was a learning project, and all of it was written in Rust.

The finished project is a tangle of wires on a breadboard, and the error handling is minimal, but I definitely have a barometer with an LCD readout.

You can get the code in my lps25_pressure_sensor_demo github repo.

Continue reading

Ear defender headphone build

2019-09-07 10 min read Making

I work in a very noisy open plan office, which makes it hard to focus. To solve the problem, and still let me listen to some music, I made these noise blocking headphones. They’re built from heavy-duty Peltor ear defenders, usually worn in industrial settings to block harmful noise levels from damaging your hearing.

I’d like to show you how I made them, so that you can do the same. Here’s a picture of what they look like:

Continue reading

Exponential smoothing in Python

2014-02-12 3 min read Coding

The problem

While measuring temperature using my Arduino and a TMP36, I found that the temperature reading fluctuated wildly. After reading up a little, it became clear that since the Arduino’s analog pin measures discrete values of 0-1023, and the voltage varies between 0-5V, the smallest difference that can be detected is ca. 4.9mV. For the TMP36, a temperature change of 1°C triggers a voltage change of 10mV, so the smallest temperature increment that can be registered is ±0.5°C. For additional fun, the sensor is only accurate to ±2°C, so plenty of opportunities for sensor fluctuations.

Continue reading

Networking monitoring with a RaspberryPI

2013-06-29 5 min read Coding

A while back my house mates and I found that our internet connection was terribly slow in the evenings.

I decided to use my newly arrived Raspberry Pi to write some monitoring tools to see what the pattern was and how bad it was. This way we would also have something to give to Virgin Media to show there was a problem. At the same time, I had been wanting to write some software to push data into the graphing system Graphite, so this seemed like a good time to do that.

Continue reading

Coffeebot Heroine

2013-06-17 3 min read Writing

Coffeebot Heroine

This body is a hotel and a shrine. You can have it when I die.

Hoxton separatists with Romanian AK-47s and grenades, probably bought wholesale somewhere south of the river in a little place you’ve never heard of. My trousers were uncomfortably soaked in petrol as I was pinned down by small arms fire, hiding behind a black cab.

I’d explain, but I’m jonesing for my next double macchiato. My muscles are hurting and I’m sweating rivers. I’ve been here an hour, and the retro coffee house on the corner won’t bring me even a long black on account of the tossers in camouflage cardigans. I’ve called them a dozen times to ask, but they won’t relent. Last I called, I suggested they tape the lid on tight and use a belt to slingshot it to me. They suggested I keep my head down.

Continue reading