esp32cam-demo/README.md

60 wiersze
3.6 KiB
Markdown
Czysty Zwykły widok Historia

2020-10-02 07:38:27 +00:00
<h1>ESP32Cam-demo sketch for use with the Arduino IDE</h1>
2020-10-02 07:33:51 +00:00
<p align="center"><img src="/images/esp32cam.jpeg" width="80%"/></p>
2020-09-27 08:20:45 +00:00
2020-09-27 06:36:59 +00:00
This can be used as a starting point sketch for your projects using the esp32cam development board, it has the following features
2020-09-27 08:32:04 +00:00
* web server with live video streaming and control buttons
* sd card support (using 1bit mode to free some io pins)
2020-10-02 07:39:46 +00:00
* io pins available for use are 12 and 13 (12 must be low at boot)
* flash led is still available for use on pin 4 when using an sd card
2020-11-11 09:22:07 +00:00
* Can read the image as RGB data (i.e. 3 bytes per pixel for red green and blue value)
2020-09-26 14:38:32 +00:00
2020-10-23 10:36:11 +00:00
I have tried to make the sketch as easy to follow/modify as possible with lots of comments etc. and no additional libraries used, as I found it quiet confusing as an ameteur trying to do much with this module and difficult to find easy to understand examples/explanations of what I wanted to do, so I am publishing this sketch in the hope it will encourage/help others to have a try with these powerful and VERY affordable modules.
2020-10-13 07:01:32 +00:00
2020-09-27 06:36:59 +00:00
2020-09-29 07:37:43 +00:00
The module is not the easiest to use as it does not have a usb socket on board so you will need an in circuit programmer to program it, these can be bought on eBay very cheaply or you can use an Arduino as one: https://pre-processing.com/how-to-configure-the-esp32-cam-with-arduino-uno/
I built myself a simple "shield" which I can plug the esp32cam module in to and program it using a couple of toggle switches to the ESP32Cam on and off and select programming mode, this makes using these boards much more convenient.
2020-10-02 06:47:42 +00:00
BTW: Turns out Bitluni has created one here: https://www.hackster.io/news/bitluni-aims-to-simplify-esp32-cam-development-with-the-cam-prog-usb-programming-add-on-board-a3ba3193b618
2020-09-26 14:38:32 +00:00
2020-09-29 11:24:14 +00:00
created using the Arduino IDE with ESP32 module installed (See https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/)
2020-09-26 14:38:32 +00:00
No additional libraries required
2020-09-26 14:42:53 +00:00
----------------
How to use:
Enter your network details (ssid and password in to the sketch) and upload it to your esp32cam module
If you monitor the serial port (speed 15200) it will tell you what ip address it has been given.
If you now enter this ip address in to your browser you should be greated with the message "Hello from esp32cam"
If you now put /stream at the end of the url i.e. http://x.x.x.x/stream
It will live stream video from the camera
If you have an sd card inserted then accessing http://x/x/x/x/photo
Will capture an image and save it to the sd card
2020-09-27 06:24:43 +00:00
URLs:
http://x.x.x.x/ Hello message
http://x.x.x.x/photo Capture an image and save to sd card
http://x.x.x.x/stream Show live streaming video
http://x.x.x.x/img Show most recent image saved to sd card
http://x.x.x.x/img?img=1 Show image number 1 on sd card
2020-11-11 09:22:07 +00:00
http://x.x.x.x/rgb Captures an image and converts to RGB data
2020-09-27 06:24:43 +00:00
2020-09-26 14:42:53 +00:00
----------------
2020-09-27 06:36:59 +00:00
2020-09-30 12:05:27 +00:00
Notes
-----
These modules require a good 5volt power supply. I find it best to put a good sized smoothing capacitor across the 5volts.
If you get strange error messages, random reboots, wifi dropping etc. first thing to do is make sure it is not a power problem.
BTW - You may like to have a look at the security camera sketch I have created as this has lots more going on including FTP, email, OTA updates
2020-09-27 06:36:59 +00:00
https://github.com/alanesq/CameraWifiMotion
2020-10-20 06:30:05 +00:00
In the Misc folder there is a version of the sketch which includes NTP (Real time) support
2020-10-24 06:45:18 +00:00
I have heard reports of these modules getting very warm when in use although I have not experienced this myself, I suspect it may be when streaming video for long periods? May be worth bearing in mind.