Seeed-Studio / Seeed_PM2_5_sensor_HM3301

MIT License
10 stars 7 forks source link

Error when compiling for esp32 #16

Closed PRiD357 closed 2 years ago

PRiD357 commented 2 years ago

When compiling for esp32 a error appears, upsetting everyone who shell use said product.

.../Arduino\libraries\Grove_-_Laser_PM2.5_Sensor_HM3301/Seeed_HM330X.h:91:48: error: 'u32' has not been declared HM330XErrorCode read_sensor_value(u8 *data,u32 data_len); ^ cc1plus.exe: warning: unrecognized command line option '-Wno-frame-address' exit status 1

lakshanthad commented 2 years ago

Hello,

I have tried compiling for "ESP32 Dev Module" and it compiles successfully on Arduino IDE for the basic_demo.ino example. Could you please check again?

PRiD357 commented 2 years ago

Hello,

I have tried it again after reinstalling both the library and esp32 stuff. Unfortunatly i still get the same error when compiling for "ESP32 Dev Module".

lakshanthad commented 2 years ago

Hello,

Did you try the basic_demo.ino example?

Also, have you added ESP32 board URL to File > Preferences as https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json ?

I tried again, and still it compiles fine for me.

PRiD357 commented 2 years ago

Hello,

I tried with the example given etc. I tried to compile the example with version 2.0.2 of the board installed and esp32 dev module selected and still had the same error.

PRiD357 commented 2 years ago

Hello,

there aperently was an issue with the arduino library manager. I installed the lib directly from zip and it works now. I am sorry if i have coused any incovenience.

Thanks