Air quality sensor + raspberry pi

Hi,

I am trying to use the grove air quality sensor with a raspberry pi 2 but no grovepi, I set the red - 5V, black - GND, yellow and white - GPIO pins directly onto the pi’s GPIO pin layout.
I am trying to read the GPIO pins which have the yellow and white wires connected by using the raspberry pi’s GPIO python library with the GPIO.input(pinNo) command. I am getting a bunch of intermittent 0 and 1s as value.
Looking at the air quality sensor’s C code I see that it is doing an analog read of the serial and the values are somewhere around < 300 but > 10 for good air quality.

What am I missing here? Does it all make sense?

This should work although I personally haven’t tried with raspberry pi, only with arduino. You could also have a look at
software.intel.com/en-us/iot/ha … ity-sensor

Regards,
Mike