mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-06 11:36:51 +03:00
nightly
This commit is contained in:
@@ -12,6 +12,21 @@
|
||||
char scratch2[SCRATCH_BUFSIZE2];
|
||||
|
||||
|
||||
void PowerResetCamera(){
|
||||
ESP_LOGD(TAGPARTCAMERA, "Resetting camera by power down line");
|
||||
gpio_config_t conf = { 0 };
|
||||
conf.pin_bit_mask = 1LL << GPIO_NUM_32;
|
||||
conf.mode = GPIO_MODE_OUTPUT;
|
||||
gpio_config(&conf);
|
||||
|
||||
// carefull, logic is inverted compared to reset pin
|
||||
gpio_set_level(GPIO_NUM_32, 1);
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
gpio_set_level(GPIO_NUM_32, 0);
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
|
||||
esp_err_t handler_lightOn(httpd_req_t *req)
|
||||
{
|
||||
LogFile.WriteToFile("handler_lightOn");
|
||||
|
||||
@@ -11,4 +11,6 @@ static const char *TAGPARTCAMERA = "server_camera";
|
||||
|
||||
void register_server_camera_uri(httpd_handle_t server);
|
||||
|
||||
void PowerResetCamera();
|
||||
|
||||
#endif
|
||||
@@ -104,6 +104,8 @@ void Init_NVS_SDCard()
|
||||
|
||||
extern "C" void app_main()
|
||||
{
|
||||
printf("Do Reset Camera\n");
|
||||
PowerResetCamera();
|
||||
// LogFile.WriteToFile("Startsequence 01");
|
||||
Init_NVS_SDCard();
|
||||
LogFile.WriteToFile("Startsequence 02");
|
||||
|
||||
Reference in New Issue
Block a user