if (buf) {
// decode packet here
- fprintf(stdout, "SENSOR:TYPE=ACURITE_5IN1,");
if (debug_output) {
for (i=0; i < 8; i++)
fprintf(stderr, "%02X ", buf[i]);
if ((buf[2] & 0x0F) == 1) {
// wind speed, wind direction, rainfall
+ fprintf(stdout, "SENSOR:TYPE=ACURITE_5IN1,");
float rainfall = 0.00;
int raincounter = acurite_getRainfallCounter(buf[5], buf[6]);
fprintf(stdout, "RAINGAUGE=%0.2f\n", rainfall);
} else if ((buf[2] & 0x0F) == 8) {
+ fprintf(stdout, "SENSOR:TYPE=ACURITE_5IN1,");
// wind speed, temp, RH
fprintf(stdout, "WINDSPEED=%d,",
acurite_getWindSpeed(buf[3], buf[4]));
if(buf){
fprintf(stdout, "SENSOR:TYPE=ACURITE_TEMP,");
fprintf(stdout, "TEMPERATURE=%.1f,", acurite_th_temperature(buf));
- fprintf(stderr, "HUMIDITY=%d\n", buf[3]);
+ fprintf(stdout, "HUMIDITY=%d\n", buf[3]);
return 1;
}