Example compiles fine for Teensy 3.5, but when I change the target to Arduino Mega 2560, I get lots of errors like this:
Compiling ‘SparkFun_VL53L5CX_EX1’ for ‘ATmega2560 (Mega 2560) (Arduino Mega) (mega_atmega2560)’
vl53l5cx_api.cpp:65: In file included from
vl53l5cx_buffers.h: 86103:1: error: too many initializers for 'const uint8_t [0] {aka const unsigned char [0]}
vl53l5cx_buffers.h:86103: sorry, unimplemented non-trivial designated initializers not supported
vl53l5cx_buffers.h:86103: sorry, unimplemented non-trivial designated initializers not supported
vl53l5cx_buffers.h:86103: sorry, unimplemented non-trivial designated initializers not supported
Any idea why this is happening?
TIA,
Frank
That sensor’s firmware/sketch uses more memory than a MEGA has available; the hookup guide https://learn.sparkfun.com/tutorials/qw … are-hookup notes
“Hardware Hookup - A note on choosing a board: The VL53L5CX is unique in that it requires its firmware to be loaded at power-on over the I2C bus. Because this firmware is ~90k bytes, we recommend a microcontroller with enough flash to store VL53L5CX’s firmware as well as your program code. Sorry, Uno’s are out. But didn’t you want an excuse to try out something new? We recommend choosing either an Artemis Thing Plus or an ESP32 Thing Plus board as your development board.”
Using a microcontroller with more memory is the fix
Thanks! I do remember reading that - but thought the Mega would do the trick. Rats!
Frank