Overflow in constant expression?

I'm trying to use an example (CameraCaptureRawBytes) from an Arduino library (Arduino_OV767X) but when trying to upload it to a board this error appears.
Any idea how to fix this?
Overflow in constant expression
WARNING: library Arduino_OV767X claims to run on mbed architecture(s) and may be incompatible with your current board which runs on avr architecture(s).
CameraCaptureRawBytes:35:20: error: overflow in constant expression
byte data[320 * 240 * 2]; // QVGA: 320x240 X 2 bytes per pixel (RGB565)

... "

Probably trying to tell you that that product cannot fit into a "byte" which has a maximum value of only 255.

1 Like

More likely an "int" that it can't fit in.

What should I do?

The array takes up 153620 bytes of memory, which AVR-based Arduinos do not support.

Use an MCU with enough memory, and 32 bit addressing.

I'm just confused on how were did this people able to do so on this tutorial

"Arduino Nano 33 BLE Sense'


This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.