Cannot connect ESP8266 board with Arducam Mini 2 Mp


I am currently trying to use the Arducam Mini 2 Mp with the ESP8266 board (NodeMCU). I follow this project. With this wiring:

// ArduCAM mini → ESP8266-12E
// CS → D0
// MOSI → D7
// MISC → D6
// SCK → D5
// GND → GND
// VCC → 3V3
// SDA → D2
// SCL → D1

I also tried another project. With both I have a problem at this code part:

//Check if the camera module type is OV2640
myCAM.wrSensorReg8_8(0xff, 0x01);
myCAM.rdSensorReg8_8(OV2640_CHIPID_HIGH, &vid);
myCAM.rdSensorReg8_8(OV2640_CHIPID_LOW, &pid);
if ((vid != 0x26 ) && (( pid != 0x41 ) || ( pid != 0x42 )))
Serial.println("Can’t find OV2640 module! pid: " + String(pid));
Serial.println(“OV2640 detected.”);

It will get 254 for vid and 239 for pid.

We checked the wiring several times and I am not quite sure, if something is broken or how to troubleshoot from here. If someone could help me out, I would appreciate it very much.

Thanks a lot.

Share the complete code for your project, without it no one could help you out.

Thank you for the advice. The whole code is in the above link to the project on GitHub. I thought that would be enough.

I found the solution. The error could happen because of a faulty cable (s. here) or because the code puts the camera to sleep (s. here). Second problem, which was mine, could be fixed with:

yourcam.clear_bit(ARDUCHIP_GPIO, GPIO_PWDN_MASK);