There's no schematic there, so on this explanation I'll assume that you
have the bare sensor in hand, which is probably not the case.
Connect one of {A,B} pins and one of the H pins to IOIO 5V.
Connect the other H pin to IOIO GND.
Connect the other {A,B} pin through a 4.7kOhm resistor to IOIO GND.
Also connect that same pin to an analog input.
The sensor changes its resistance depending on several factors, gas
presence being one of them. The voltage you'll be reading on the analog
pin, assuming the sensor's resistance is R will be:
V = 5 * 4700 / (4700 + R)
You can solve for R, given a measured voltage. Now, you can translate R to
concentration of gas according to the charts in the datasheet. Note that
you'll need to know, or assume, the humidity and temperature.
The value 4.7k has been specifically chosen to guarantee the voltage on the
analog pin does not exceed 3.3V. Do not use a higher value resistor as you
may damage the IOIO.
On Wed, Apr 2, 2014 at 1:35 AM, Marius Vosylius
<[email protected]>wrote:
> Ytai I'm using Breakout Board, not a bare Sensor.
>
> GND - BreadBoard-GND + 1 (10k Ohm)
> VCC - BreadBoard-VCC
> AOUT - IOIO (Pin40)
>
>
> Link for Sensor Below, It just was purchased from elsewhere:
>
> http://www.dx.com/p/mq-2-smoke-gas-sensor-v-1-3module-for-arduino-black-148609#.UzvKJ61dUb4
>
>
> On Wednesday, April 2, 2014 1:25:10 AM UTC+1, Ytai wrote:
>
>> Are you using the bare sensor or a breakout board that has a few more
>> components on it? If that latter, please send a product page link or, even
>> better, a schematic.
>>
>>
>> On Tue, Apr 1, 2014 at 1:37 PM, Marius Vosylius <[email protected]>wrote:
>>
>>> Dear Ytai, I have followed these steps and able to output V out. Heres
>>>> a picture of my code below:
>>>>
>>>
>>>
>>> <https://lh4.googleusercontent.com/-q97pzmVV1q4/UzsjMrTChCI/AAAAAAAAHps/czg42ZZhKJo/s1600/Screen+Shot+2014-04-01+at+21.34.25.png>
>>> My V Outpout is: 2.8 - 3.0 V
>>> Reading Output is: 0.87 - 1.
>>>
>>> Please advise me what else do I need to do to get Gas MQ2 Reading.
>>> Thanks.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "ioio-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>>
>>> Visit this group at http://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.