Post a new topicPost a reply Page 1 of 1   [ 2 posts ]
Author Message
 Post subject: Always wrong output from CO2 sensor TGS4161
PostPosted: Thu Mar 08, 2012 5:36 pm 

Joined: Wed Feb 22, 2012 1:34 pm
Posts: 22
Quote:
int co2 = 0;
  SensorGas.setBoardMode(SENS_ON);
  SensorGas.configureSensor(SENS_CO2, 10);// Gain of 10
  SensorGas.setSensorMode(SENS_ON, SENS_CO2);
  [color=#CC6600]delay
(45000); // Wait for CO2 sensor warmup
  co2 = analogRead(ANALOG3) // Reading ADC value, not volts

When running
Quote:
  XBee.print("Carbon dioxide level: ");
  XBee.println(co2);


I always get "Carbon dioxide level: 4" on my terminal, even if I change the gain to 1.

What could be the problem? I read out the other sensors like this as well, and they are working perfectly.
Thank you very much in advance


Top
 Profile  
 
 Post subject: Re: Always wrong output from CO2 sensor TGS4161
PostPosted: Fri Mar 09, 2012 10:08 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7516
Hi sinnadyr,

the part of the code you use to read the sensor seems right. Could you please post your whole code so we can try it here in Libelium?

Regards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 2 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use