cannot declare variable 'camera' to be abstract type 'Sipeed_OV2640'

I am attempting to compile the ‘selfie’ example using the Arduino IDE. Unfortunately compilation aborts with error 'cannot declare variable ‘camera’ to be abstract type ‘Sipeed_OV2640’. I have been able to load and run ‘basic_display’, but of course this does not use the camera, so wondering if this is a pointer? The camera supplied has a short cable (I mention this as another post in this forum indicates issues with the larger one).
Any suggestions appreciated.

1 Like


it’s because of a typo on the libraries : “setRotaion” for “setRotation”
You have to edit these files; on your local Arduino libraries :
“Sipeed_OV2640.cpp” at line 724
“Sipeed_OV2640.h” at line 57

More informations here :

I did these modifications, and the program is good now, but not working at all for me…I think because I have the camera with the long cable (different camera ? not working with the library ?)

But with MicroPython IDE, the same kind of program is working well for me.


Thank you for your response, changing the two files in the library works a treat in that Selfie now compiles with no error.
However, I dont think it is running (not sure how to check). After loading, screen dispays blank red screen. I assume I would expect the screen to display what ever is in front of the camera? Is there something else I should do to ‘take’ the selfie, or does it run in real time? My camera is the one with the short leads.
Almost, but not quite there.

Just to confirm, I am now receiving the ‘SNAP FAIL’ error on Serial 3 so clearly get to line 25 of the sketch so looks as if error is manifest at line 24. I have tried re-seating the camera connection, does this suggest a faulty camera, or am I ‘barking up the wrong tree’?

I can confirm it works OK with the camera from the kit Maix Bit 1.0
I think Maix Bit with mic come with a different camera which is not supported yet. it seems to be GC0328.
Micropython supports it, looking in my computer I can find gc0328.c and gc0328.h.
this is not what we need.
Seeedstudio should specify this different camera in changes from Maix Bit 1.0 to Maix Bit with mic.
And camera should be supported on Maixduino too.