Grove Laser PM2.5 Sensor(HM3301)

Hello, I have a problem with my MKR1010 and the basic sketch for the Laser PM2.5 Sensor.

The message is the following:



In file included from /var/folders/sp/mw2crk5j39911gchgyz2nlg40000gn/T/arduino_modified_sketch_537739/basic_demo.ino:32:0:

/Users/…/Arduino/libraries/Grove___Laser_PM2_5_Sensor_HM3301-1.0.2/Seeed_HM330X.h:77:58: error: ‘u32’ has not been declared

HM330XErrorCode IIC_read_bytes(u8 start_reg,u8 *data,u32 data_len);



Can you help me please ?

All the best.

Filippo

Hi there

maybe you need to update the library of Grove Laser PM2.5 Sensor(HM3301). :smiley:

I did it, I have newest version 1.0.2. MKR1010 is a new generation of Arduino board for WiFi IoT applications I compiled the basic sketch for the sensor choosing in the Arduino IDE older board (arduino Uno, Arduino Yun) without error. It is a specific software error for the MKR Arduino board generation. Any ideia ?

Regards,

Hi there

we updated our library of Grove Laser PM2.5 Sensor(HM3301) for compatibility of mkr1000. and you can get it by updating the library of Grove Laser PM2.5 Sensor(HM3301).you can find link by visiting <LINK_TEXT text=“https://github.com/Seeed-Studio/Seeed_P … sor_HM3301”>https://github.com/Seeed-Studio/Seeed_PM2_5_sensor_HM3301</LINK_TEXT> :smiley: .

Many thanks for the fast reply. Now it works fine. All the best.

Hello, I have a question about the HM3301 sensor.

Do you know if I can separate the data reading to activate different outputs depending on the 6 values?

I want to compare a fixed value and activate an output if the reading data is surpassed.

Can you help me?

All the best.

Oier