jomjol / AI-on-the-edge-device

Easy to use device for connecting "old" measuring units (water, power, gas, ...) to the digital world
https://jomjol.github.io/AI-on-the-edge-device-docs/
5.75k stars 618 forks source link

Option for simple GPIO12 On/Off LED #3064

Open yllwfsh opened 4 months ago

yllwfsh commented 4 months ago

The Feature

Dear all,

First of all thx for this amazing project! Would it be possible to add functionality for a simple On/Off LED, on GPIO12? I would like to switch a simple white LED. Right now I have it connected directly to 5V, and therefore always on.

Would be great if it's possible to switch it on using GPIO12 (and possibly a transistor) just when taking a picture of the meter.

Functionality would need to include inverting the logic (e.g. selecting Active HIGH/LOW to allow for a transistor to switch the load).

Thanks for looking into this!

jasaw commented 4 months ago

@yllwfsh GPIO4 goes HIGH when it takes photo and I have my white LEDs connected to it via transistors and it's working well. https://randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/

yllwfsh commented 4 months ago

@jasaw True! But that still switches on the built-in Led. Wouldn't it be a more flexible solution if we were able to pick a different GPIO pin?

jasaw commented 3 months ago

I believe the GPIO4 still goes high even if you configure the LED intensity to 0, so that basically turns off the onboard flash LED and relies on your external LEDs. Test it out.