You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maintenance changes in the component, examples and readme (#597)
* maint(build): remove legacy GNU Make build system support
* maint(example): move the example so that component manager finds it
* maint(example): specify component dependency
* maint(build): clean up legacy 'register_component' usage
* maint(build): specify more fields in component manifest
* doc(readme): simplify installation instructions
See #596
* maint(ci): remove tests for EOL versions (v4.1, v4.2)
* fix(build): add missing transitive dependency on driver component
Copy file name to clipboardExpand all lines: README.md
+19-33Lines changed: 19 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -40,13 +40,25 @@ This repository hosts ESP32 series Soc compatible driver for image sensors. Addi
40
40
## Installation Instructions
41
41
42
42
43
-
### Using esp-idf
43
+
### Using with ESP-IDF
44
44
45
-
- Clone or download and extract the repository to the components folder of your ESP-IDF project
45
+
- Add a dependency on `espressif/esp32-camera` component:
46
+
```bash
47
+
idf.py add-dependency "espressif/esp32-camera"
48
+
```
49
+
(or add it manually in idf_component.yml of your project)
46
50
- Enable PSRAM in `menuconfig` (also set Flash and PSRAM frequiencies to 80MHz)
47
51
- Include `esp_camera.h` in your code
48
52
49
-
### Using PlatformIO
53
+
These instructions also work for PlatformIO, if you are using `framework=espidf`.
54
+
55
+
### Using with Arduino
56
+
57
+
#### Arduino IDE
58
+
59
+
If you are using the arduino-esp32 core in Arduino IDE, no installation is needed! You can use esp32-camera right away.
60
+
61
+
#### PlatformIO
50
62
51
63
The easy way -- on the `env` section of `platformio.ini`, add the following:
52
64
@@ -68,41 +80,15 @@ Enable PSRAM on `menuconfig` or type it direclty on `sdkconfig`. Check the [offi
68
80
CONFIG_ESP32_SPIRAM_SUPPORT=y
69
81
```
70
82
71
-
***Arduino*** The easy-way (content above) only seems to work if you're using `framework=arduino` which seems to take a bunch of the guesswork out (thanks Arduino!) but also suck up a lot more memory and flash, almost crippling the performance. If you plan to use the `framework=espidf` then read the sections below carefully!!
It's probably easier to just skip the platform.io library registry version and link the git repo as a submodule. (i.e. using code outside the platform.io library management). In this example we will install this as a submodule inside the platform.io $project/lib folder:
After that `#include "esp_camera.h"` statement will be available. Now the module is included, and you're hopefully back to the same place as the easy-Arduino way.
87
-
88
-
**Warning about platform.io/espidf and fresh (not initialized) git repos**
89
-
There is a sharp-edge on you'll discover in the platform.io build process (in espidf v3.3 & 4.0.1) where a project which has only had `git init` but nothing committed will crash platform.io build process with highly non-useful output. The cause is due to lack of a version (making you think you did something wrong, when you didn't at all) - the output is horribly non-descript. Solution: the devs want you to create a file called version.txt with a number in it, or simply commit any file to the projects git repo and use git. This happens because platform.io build process tries to be too clever and determine the build version number from the git repo - it's a sharp edge you'll only encounter if you're experimenting on a new project with no commits .. like wtf is my camera not working let's try a 'clean project'?! </rant>
90
90
91
-
## Platform.io Kconfig
92
-
Kconfig is used by the platform.io menuconfig (accessed by running: `pio run -t menuconfig`) to interactively manage the various #ifdef statements throughout the espidf and supporting libraries (i.e. this repo: esp32-camera and arduino-esp32.git). The menuconfig process generates the `sdkconfig` file which is ultimately used behind the scenes by espidf compile+build process.
93
-
94
-
**Make sure to append or symlink**[this `Kconfig`](./Kconfig) content into the `Kconfig` of your project.
95
-
96
-
You symlink (or copy) the included Kconfig into your platform.io projects src directory. The file should be named `Kconfig.projbuild` in your projects src\ directory or you could also add the library path to a CMakefile.txt and hope the `Kconfig` (or `Kconfig.projbuild`) gets discovered by the menuconfig process, though this unpredictable for me.
97
-
98
-
The unpredictable wonky behavior in platform.io build process around Kconfig naming (Kconfig vs. Kconfig.projbuild) occurs between espidf versions 3.3 and 4.0 - but if you don't see "Camera configuration" in your `pio run -t menuconfig` then there is no point trying to test camera code (it may compile, but it probably won't work!) and it seems the platform.io devs (when they built their wrapper around the espidf menuconfig) didn't implement it properly. You've probably already figured out you can't use the espidf build tools since the files are in totally different locations and also different versions with sometimes different syntax. This is one of those times you might consider changing the `platformio.ini` from `platform=espressif32` to `platform=https://github.com/platformio/platform-espressif32.git#develop` to get a more recent version of the espidf 4.0 tools.
99
-
100
-
However with a bit of patience and experimenting you'll figure the Kconfig out. Once Kconfig (or Kconfig.projbuild) is working then you will be able to choose the configurations according to your setup or the camera libraries will be compiled. Although you might also need to delete your .pio/build directory before the options appear .. again, the `pio run -t menuconfig` doens't always notice the new Kconfig files!
101
-
102
-
If you miss-skip-ignore this critical step the camera module will compile but camera logic inside the library will be 'empty' because the Kconfig sets the proper #ifdef statements during the build process to initialize the selected cameras. It's very not optional!
103
-
104
-
105
-
## Examples
91
+
This command will download the example into `camera_example` directory. It comes already pre-configured with the correct settings in menuconfig.
0 commit comments