Please disregard my last post I just needed to switch my Rx and Tx to pins 3 and 2 on my arduino board to match with the code :cold_sweat:
However I would still like to operate in polling mode. I am getting a constant flush of data from the sensor even though I am attempting to operate in polling mode. Here is my sketch:
#include
#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);
}
Notice I un-commented the line where CZR_POLLING is. I may be going about the whole process wrong though... Any ideas?