Sodaq Mbili and wifibee

Hello Gabriel,

I have posted a question over Air Quality Sensor.


I didn;t get any reply sofar. Can you please assist me with this.

Regards,
Barani !

I repeat my question once again below:-

Recently, I bought an air quality sensor v1.3 and a WIFIBEE from Sodaq to
try out.

For the Air Quality sensor … i uploaded code from below site.
My board is Sodaq autonomo, which I got during the workshop and i have
connected this sensor to A0.
http://www.seeedstudio.com/wiki/Grove_-_Air_Quality_Sensor

but it didn;t compile and gave error at this part
ISR(TIMER2_OVF_vect)

{
if(airqualitysensor.counter==122)//set 2 seconds as a detected duty
{

    airqualitysensor.last_vol=airqualitysensor.first_vol;
    airqualitysensor.first_vol=analogRead(A0);
    airqualitysensor.counter=0;
    airqualitysensor.timer_index=1;
    PORTB=PORTB^0x20;
}
else
{
    airqualitysensor.counter++;
}

}

Sorry about that, I actually created a quick, and somewhat dirty, fix a few weeks ago. I didn’t want to post it publicly as the original library is quite a mess and I didn’t have the time to fix it up properly.

I actually assumed that the person I sent it to was you, however, it seems that there was another person experiencing the exact same problem.

I’ll post a link after I upload it to github.

Here you go:

Thanks Gabriel.

I have been waiting for this for long.
I will test this and let you.

Regards,
Barani !

Hello Gabriel,

The Air Quality sensor works now.
Many thanks.

The only thing, which I want to adjust is to get the actual sensor value instead of 0, 1, 2 and 3.
Perhaps, I can adjust the return value in airqualitysensor.slope() and apply the calculation in the application itself.

Regards,
Barani !

Yes you should modify that function if you want a different output.

I believe it currently takes the raw analog reading and converts that into a value ranging from 0-3. I’m not sure how useful the raw analog reading is though.