Dear Rob Tillart,
I tried to run this code
http://www.co2meters.com/Documentation/AppNotes/AN128-%20Cozir_Arduino.pdf -
I tried to send the command " z\r\n" to get the co2 values but it didn't work for me so i removed the while condition and it started displaying co2 values
//while(buffer[ind-1] != 0x0A)
{
if(mySerial.available())
{
buffer[ind] = mySerial.read();
ind++;
}
//}
Now when I included the cozir.h file and tried to run this code (posted by @DirtGambit) nothing is displaying on serial monitor. I tried this arduino 1.0.3 as well.
#include <SoftwareSerial.h>
#include "cozir.h"
SoftwareSerial nss(3,2);
COZIR czr(nss);
void setup()
{
Serial.begin(9600);
delay(3000);
//czr.SetOperatingMode(CZR_POLLING);
//czr.SetOperatingMode(CZR_STREAMING);
}
void loop()
{
float t = czr.Celsius();
float f = czr.Fahrenheit();
float h = czr.Humidity();
int c = czr.CO2();
int digi = czr.GetDigiFilter();
Serial.print("Celcius : ");Serial.println(t);
Serial.print("Fahrenheit : ");Serial.println(f);
Serial.print("Humidity : ");Serial.println(h);
Serial.print("CO2 : ");Serial.println(c);
Serial.print("Digital Filter : ");Serial.println(digi);
}