DFRobot / DFRobot_AS3935

MIT License
14 stars 17 forks source link

ESP32 IRQ #13

Closed johnwargo closed 4 months ago

johnwargo commented 5 months ago

@tangjie133 I submitted a forum post for this but thought I'd also ask here.

https://www.dfrobot.com/forum/topic/334449

In the sample code, why is this code needed?

#if defined(ESP32) || defined(ESP8266)
#define IRQ_PIN 0
#else
#define IRQ_PIN 2
#endif

What's different about ESP32 that it needs a specific IRQ assignment? Looking at the specs for ESP32 all of the GPIO ports can be used for interrupts.

The code doesn't tell me enough about this for me to know how to wire a Beetle board correctly.

johnwargo commented 5 months ago

I figured it out, I'll update my forum post.

johnwargo commented 5 months ago

I created a PR to make this more clear (and remove the developer's hardware config from the sample) https://github.com/DFRobot/DFRobot_AS3935/pull/14

tangjie133 commented 4 months ago

Thank you for the feedback.