How do you feel about this article? Help us to provide better content for you.
Thank you! Your feedback has been received.
There was a problem submitting your feedback, please try again later.
What do you think of this article?
Enthusiastic about the AQ sensor kit
As we first heard of the AQ sensor kit we were quite amazed: a compact one-stop solution to gather data pertaining to air quality. That's cool. But we've always struggled with the way that data is usually visualized - numbers, numbers and numbers. It really doesn't tell you how it "feels" and what the impact is when the air quality gets worse. So having the chance of being part of the beta community we saw a chance to change that - and turn air quality data into an experience of light and sound. So we sent in the application - and got the green lights for our little project.
A simple idea
The air quality data that is delivered in a data stream should be parsed and then forwarded to two interfaces for sounds and light.
Sound
We thought it might be a good idea to use an external "sound card" - which is available for a couple of Euros and provision the audio. At that point, it was neither clear to us whether the simple audio interface that we had would work on the Raspberry PI nor if the if PURE DATA would be the best tool to parse the data and turn it into sound. But it doesn't take long before we find out...
Light
Light we thought would be simpler to implement. We already have good experience with Neopixels and an Arduino could be easily connected as a virtual serial interface.
Easy to build
As the package arrived at home we were amazed. So much detail has been taken care of in order to make it a great experience to build. But it was a lot of parts...
Instructions were fine and the enclosed metal nuts ensure that the plastic parts aren't destroyed by the screws when opening the case a couple of times. That is great!
Putting it all together was a breeze and it worked - almost quite out of the box - but the SD image you are able to download got you 99% there.
First Proof of concepts
As building the AQ sensor kit and installing the software was done, the initial testing showed that the device was working properly. The next thing to be done is installing pure data which was done easily using the package manager.
Installing the audio software
sudo apt-get install puredata
After starting Pure Data, we first needed to make sure that the sound card (which is like a couple attached from USB and offered a small audio jack on the other side) works properly. Yes, we could have used the sound card included, however, the sound quality is not that great and the least invasive way is just to attach it via USB.
Selecting the audio interface
And yes - it was possible to select the audio interface. Now let's put it to work with a simple audio patch.
Testing audio
In this audio patch, a frequency of 440 Hertz is the input for a sine oscillator (osc~). The output is multiplied (*~) by 0.5 to lower the volume. The output is patched to the left and right output of the Digital Audio Interface (dac~). In order to play the audio, the DSP needs to be enabled via the menu. You could hear the 440 Hz sine wave on the attached loudspeaker. So now we know that the AQ sensor, audio interface and PURE DATA are working as expected. The next step is to connect the data of the air quality stream to pure data. That will be shown in our next posting.
The next step is to transport the data stream into PURE DATA and also to trigger sounds based on the input.