void cameraInit() {
digitalWrite(gpioCameraVcc, LOW); // Power camera ON
// OV5642 Needs special settings otherwise will not wake up
myCAM.clear_bit(6, GPIO_PWDN_MASK); // Disable low power
delay(3);
myCAM.set_format(JPEG);
myCAM.InitCAM();
delay(50);
myCAM.write_reg(3, 2); // VSYNC is active HIGH
delay(47);
}
void cameraOff() {
digitalWrite(gpioCameraVcc, HIGH); // Power camera OFF
}
But I discovered that this times are not working the same with different OV5642 5 megapixels camera. Question is: There is not a more clever way to do this ? Like make a while(check something)
that will return true when camera wakes up fully ?
Can you please reference me to a code snippet ?
I'm trying to wake up camera only on the moment of taking a picture and then shutting it of via a P-channel mosfet.
So I built this functions:
But I discovered that this times are not working the same with different OV5642 5 megapixels camera. Question is: There is not a more clever way to do this ? Like make a while(check something) that will return true when camera wakes up fully ? Can you please reference me to a code snippet ?