Problem with honeywell dust sensor HPMA115C0-003 arduino library

Hello all,
I'm using a mega arudino board, with the honeywell dust sensor HPMA115C0-003 hooked up on the hardware serial, Serial 1.
I used the library from mitkor2. The senor keeps reporting 0 on all values.
I made some modification on the 'example' code. Code below.
Any suggestions help. Thank you!

#include <hpma115C0.h>
uint32_t pm1_0,pm2_5,pm4_0,pm10;
HPMA115C0 hpma(Serial1);

void setup() 
{
  Serial.begin(9600);
  Serial1.begin(9600);            
  delay(2000);                      // The delay should be 2000-5000 ms 
  Serial.println("Dust sensor test");
  Serial.println("Starting...");
  hpma.Init();
}

void loop() 
{
  Serial.println(millis());
  hpma.ReadParticleMeasurement(&pm1_0,&pm2_5,&pm4_0,&pm10);
	Serial.println("PM 1.0: " + String(pm1_0) + " ug/m3" );
	Serial.println("PM 2.5: " + String(pm2_5) + " ug/m3" );
  Serial.println("PM 4.0: " + String(pm4_0) + " ug/m3" );
  Serial.println("PM 10: " + String(pm10) + " ug/m3" );
 
  delay(5000);
}

Follow up with additional information. TX and RX lines are on 3.3v, and power is on 5v.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.