Skip to content

Pana1v/firESP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

firESP

This code is written to take a photo using the ESP32-CAM board and save it in Firebase Cloud Storage. The photo is taken using the OV2640 camera module and saved in SPIFFS. The photo is then uploaded to Firebase Cloud Storage.

The code includes the necessary libraries and configuration parameters for the camera module and Firebase authentication. It also includes helper functions for checking if the photo was successfully taken and saved in SPIFFS.

The void initWiFi() function is used to connect to a WiFi network. It tries to connect to the WiFi network with the SSID and password provided in the code until it successfully connects.

The void initSPIFFS() function initializes the SPIFFS filesystem and checks if it has been mounted successfully. If there is an error, the ESP32 board restarts.

The void initCamera() function configures the camera module with the necessary pins, frame size, and JPEG quality.

The void capturePhotoSaveSpiffs() function takes a photo using the camera module and saves it to the SPIFFS filesystem. If the photo is not successfully saved, the function keeps trying until it is saved.

The Firebase API key, email, and password are provided in the code. The Firebase storage bucket ID is also provided.

The loop() function first initializes the Firebase authentication and checks if it is successful. If authentication is successful, the capturePhotoSaveSpiffs() function is called to take a photo and save it to SPIFFS. If the photo is successfully saved, the photo is uploaded to Firebase Cloud Storage using the Firebase_ESP_Client library. The uploaded photo is then deleted from SPIFFS. This loop runs continuously, taking and uploading photos to Firebase Cloud Storage.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages