Instructions how to install the airsensor utility on Linux.
# Tested on
* Raspbian (Raspberry Pi)
# Details
## Requirements
The Applied Sensors Indoor Air Monitor USB sensor, also sold as Voltcraft CO-20 at Conrad.
## LibUSB-dev
Install LibUSB-dev, which is needed when compiling the airsensor utility.
```
$ sudo apt-get install libusb-dev
```
# Compile tempsensor from sources
## Install required software
The 'build-essential' package is needed to be able to compile the source code.
```
$ sudo apt-get install build-essential
```
## Compile
Compile the source code
```
$ gcc -o airsensor airsensor.c -lusb
```
## Test
You can now execute the airsensor and see if you get readings, as seen on most Linux installations it seems that you must be root user, or then add udev rule to make the device read/write.
To run with root access
```
$ sudo ./airsensor -o
2013-04-28 14:55:56, VOC: 450, RESULT: OK
$
```
Without root access it will print following
```
$ ./airsensor -o
2013-04-28 14:55:19, Error: claim failed with error: -1
$
```
## Make Udev rule
Insert a udev rule to get read/write access to the device from normal user.