Notifications
Clear all

Joining 2 separate examples into 1 program

37 Posts
5 Users
5 Likes
4,205 Views
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

@drjoelleon

 

So I realized what I told you before about the LED was the tiny LED and will not provide very much light. I doubt the larger one will either. Plus, I was also confusing those two. Are you trying to access the large one? Note that the large LED is actually connected to the SD card if it you are using that at the same time you might have some issues. There is a fix for that though. But it sounds like you have no intention of using the SD card.

"Another solution with no additional chips is to rewire GPIO33 for the flash LED control and jump-wire the camera p‑MOSFET switch by permanently connecting source (S) to drain (D). Disabling camera power control slightly increases the ESP32 power consumption for about 20 mA in standby mode, but this negligible compared to expected power usage during camera regular daily operation, or if battery power supply is used only as a backup." source

You would need to do some rewiring.

 

I would actually suggest an led array or just a good cob LED with a decent Cree LED that you activate through a data pin. It would need it's own power supply though. I would not run it through the ESP.

 

Adding the button to the HTML was a little harder than I imagined. I will still try but it is a little over my head at this point but that's how I learn. I don't want to alter some libraries to accomplish it or have a close duplicate with minor alterations. I would prefer if it was standalone.


   
ReplyQuote
(@drjoelleon)
Member
Joined: 3 years ago
Posts: 41
Topic starter  

@madmisha

the large LED will be bright enough. I remember using the camera without the Wifi  in the beginning and it is very bright. The builtinLED I remember someone saying is pin 4. I will try to write a simple loop that will include a digital.print(?) and see if I can’t get it to turn on. Perhaps the loop can change the value of the pin so I can see if it’s a different PIN number.

your interest is very appreciated.

thanks

joel


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

@drjoelleon

If you try to just drop the basic server response sketch into the loop, it will be ignored because of the apache camera server. Here is a quick solution I came up with since it will take some time to get a button in the menu.

I added a handler to the HTTPD file. I copied the status handler(stream was terrible, control didn't work, capture did. I might be good to make a custom handler but I would need to mess around with it). If you use /LED it will toggle. There is a delay. If you want it to be quicker just edit the delay in the loop. I did not add an indication of the LED being on to that page so when you get the that stats, it has executed. I might go back and make it bring up the index page when triggering.

 

The LED is fairly bright. I hope it works for you.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

@drjoelleon

 

If you are still interested, I was able to put the LED button on the main page. With this, you should be able to just click it to toggle it on and off. No need to load a blank page.

 


   
DaveE reacted
ReplyQuote
(@drjoelleon)
Member
Joined: 3 years ago
Posts: 41
Topic starter  

@madmisha

Thanks.

I will look at your program a little later.

I was able to get the led to turn on very bright using pin mode but was unable to turn it off. 
Perhaps it is a problem with the specific esp32-cam I used. I just received a real AI Thinker board and will try this along with your code as well.

Joel


   
ReplyQuote
(@sj_h1)
Member
Joined: 4 years ago
Posts: 167
 

I had the same issue and the problem was that I did NOT have the correct hardware selected. Make sure you are selecting "ESP32 Wrover Module". Arduino pulls from different libraries and includes depending on the hardware selected.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

@drjoelleon

It worked on mine but I did notice a slight flicker in the LED. I think that's because of the power draw from the camera. I selected the AI Thinker ESP-32CAM. I should try it on a a better 5V supply with better amperage rating but it might be held back by the voltage regulator.


   
ReplyQuote
Page 3 / 3