If anyone is interested I put together some code and documentation for measuring the capacitance of a Smartec HS07 (SMTHS07) humidity sensor. Obviously, something like a DHT22 is a much more convenient solution but I wanted to see what the result would be from a direct capacitative measurement. Also, the code can be used for measuring capacitance in general. It’s not comprehensive enough for a proper Particle library, methinks, it’s more of a code snippet actually, so I’m keeping it at GitHub:
As the ADC inputs of the STM32 chips are unbuffered, I ran into some problems, and I have therefore used an op-amp to interface the sensor. If anyone has an idea on how to get the variance of the measurements down, I would be very grateful. However, I suspect the fact that I need to measure on a microsecond scale but only get whole microseconds (using micros()), is a strongly contributing factor.