Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
clausqr committed Sep 7, 2023
1 parent c2de077 commit 97d090c
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 9 deletions.
82 changes: 80 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,81 @@
## Pruebas de esp32cam con esp-idf
Sure! Let's add those instructions and acknowledgements into the README.md.

Versión básica funcionando.
---

# ESP32CAM Streaming Project

![ESP32CAM](img/sample_image.png)
This project enables the ESP32CAM to stream images from its camera over a Wi-Fi connection. The setup initializes the NVS (non-volatile storage), connects to Wi-Fi, initializes the camera, and sets up the web server to serve the video stream.

## Requirements
![ESP32CAM](img/esp32_cam.png)

- ESP32CAM board.
- Development environment with PlatformIO and ESP-IDF.

## Features

- Initialize and setup NVS.
- Connect to a specified Wi-Fi network.
- Initialize and stream video from the ESP32CAM's camera.
- Web server to serve the video stream.

## Installation and Setup

### 1. Clone the Repository

```bash
git clone [email protected]:clausqr/esp32cam-webstream.git
cd esp32cam-webstream
```

### 2. Configuration

**WiFi Credentials:** In the repository, there is a file named `secrets.h.example`. Rename it to `secrets.h` and replace the placeholders with your Wi-Fi network credentials.

```c
#ifndef SECRETS_H
#define SECRETS_H

#define WIFI_SSID "replace_with_your_ssid"
#define WIFI_PASSWORD "replace_with_your_password"

#endif /* SECRETS_H */
```

### 3. PlatformIO Setup

Refer to the project's `platformio.ini` configuration provided earlier.

### 4. Compile and Upload

Compile and upload the code using the following commands:

```bash
platformio run --target upload
```

After the code is uploaded, open the Serial Monitor to view logs:

```bash
platformio device monitor
```

### 5. Accessing the Stream

Once the ESP32CAM is up and running, look for the IP address in the console output. Open that IP address in a web browser to watch the live stream.

## Troubleshooting

1. **Failed to connect with Wi-Fi**: Ensure that you've entered the correct Wi-Fi credentials and that the network is available and operational.
2. **Camera initialization error**: Ensure that the camera is properly connected and working.

## Contributing

If you'd like to contribute to this project, please fork the repository, make your changes, and submit a pull request.

**Issues and Pull Requests:** Feel free to open issues and submit pull requests to enhance the project. Your contributions are valued and will be reviewed.

## Acknowledgements

This code is a concoction of sources from several different online examples and repositories. The credit goes to all the original creators, mainly [https://github.com/espressif/esp32-camera](https://github.com/espressif/esp32-camera). clausqr <[email protected]> has merged these sources but takes no credit for the actual code.
Binary file added img/esp32_cam.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/sample_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

[env:esp32cam]
#platform = espressif32
platform = https://github.com/platformio/platform-espressif32.git#develop
platform = https://github.com/platformio/platform-espressif32.git#a9b9d094688a4ffeeca1da28d3e77e74df6d4430
board = esp32cam
framework = espidf

Expand All @@ -22,5 +22,4 @@ extra_scripts = ignore_no_rtti.py
build_flags =
-I../lib/esp32-camera

serial_port = /dev/ttyUSB0
monitor_speed = 115200
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ static camera_config_t camera_config = {
// .pixel_format = PIXFORMAT_RGB565, //YUV422,GRAYSCALE,RGB565,JPEG
.pixel_format = PIXFORMAT_JPEG, //YUV422,GRAYSCALE,RGB565,JPEG
// .frame_size = FRAMESIZE_QVGA, //QQVGA-UXGA, For ESP32, do not use sizes above QVGA when not JPEG. The performance of the ESP32-S series has improved a lot, but JPEG mode always gives better frame rates.
.frame_size = FRAMESIZE_240X240, //QQVGA-UXGA, For ESP32, do not use sizes above QVGA when not JPEG. The performance of the ESP32-S series has improved a lot, but JPEG mode always gives better frame rates.
.frame_size = FRAMESIZE_QVGA, //QQVGA-UXGA, For ESP32, do not use sizes above QVGA when not JPEG. The performance of the ESP32-S series has improved a lot, but JPEG mode always gives better frame rates.

// .jpeg_quality = 12, //0-63, for OV series camera sensors, lower number means higher quality
.jpeg_quality = 12, //0-63, for OV series camera sensors, lower number means higher quality
.jpeg_quality = 64, //0-63, for OV series camera sensors, lower number means higher quality
.fb_count = 2, //When jpeg mode is used, if fb_count more than one, the driver will work in continuous mode.
// .grab_mode = CAMERA_GRAB_WHEN_EMPTY,
.grab_mode = CAMERA_GRAB_LATEST,
Expand Down
3 changes: 0 additions & 3 deletions src/secrets.h.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#ifndef SECRETS_20COPY_H
#define SECRETS_20COPY_H
#ifndef SECRETS_H
#define SECRETS_H

Expand All @@ -9,4 +7,3 @@
#endif /* SECRETS_H */


#endif /* SECRETS_20COPY_H */

0 comments on commit 97d090c

Please sign in to comment.