The basic outline of my proposed project is to have a remote openmv3 camera running as an i2c master running object detection code and an Adafruit Feather m4 express board running arduino/c code as an i2c slave and has a rfm9x LoRa module attached. The sequence of events would be: camera board detects an object, captures the picture and via i2c sends it to the Feather m4 which then sends the image down to another uC (maybe an arduino due?) which receives the image, writes to an sd card and sends a notification (and/or makes it available on a very simple web page. I’ve looked at the examples provided in the rpc library and tried compiling the “image_transfer_jpg_as_the_controller_device_example” but it won’t compile. I get the following error messages:
******************************** start of errors message output *****************************
Arduino: 1.8.18 (Windows 10), Board: “Adafruit Feather M4 Express (SAMD51), Enabled, 120 MHz (standard), Small (-Os) (standard), 50 MHz (standard), Arduino, Off”
C:\Users\jobla\Documents\Arduino\JB-OPENMV-image_transfer_jpg_as_the_controller_device_example\JB-OPENMV-image_transfer_jpg_as_the_controller_device_example.ino: In function ‘void loop()’:
JB-OPENMV-image_transfer_jpg_as_the_controller_device_example:111:24: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]
111 | pixformat_and_framesize, sizeof(pixformat_and_framesize) - 1, // Do not send NULL terminator
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| const void*
In file included from C:\Users\jobla\Documents\Arduino\JB-OPENMV-image_transfer_jpg_as_the_controller_device_example\JB-OPENMV-image_transfer_jpg_as_the_controller_device_example.ino:11:
C:\Users\jobla\Documents\Arduino\libraries\openmv-arduino-rpc\src/openmvrpc.h:156:21: note: initializing argument 2 of ‘bool openmv::rpc_master::call(const __FlashStringHelper*, void*, size_t, void*, size_t, bool, long unsigned int, long unsigned int)’
156 | void *command_data, size_t command_data_len,
| ~~~~~~^~~~~~~~~~~~
JB-OPENMV-image_transfer_jpg_as_the_controller_device_example:153:85: error: invalid conversion from ‘char**’ to ‘void**’ [-fpermissive]
153 | if (interface.call_no_copy(F(“jpeg_image_read”), &arg, sizeof(arg), &jpg_data, &jpg_data_len)) {
| ^~~~~~~~~
| |
| char**
In file included from C:\Users\jobla\Documents\Arduino\JB-OPENMV-image_transfer_jpg_as_the_controller_device_example\JB-OPENMV-image_transfer_jpg_as_the_controller_device_example.ino:11:
C:\Users\jobla\Documents\Arduino\libraries\openmv-arduino-rpc\src/openmvrpc.h:136:30: note: initializing argument 4 of ‘bool openmv::rpc_master::call_no_copy(const __FlashStringHelper*, void*, size_t, void**, size_t*, long unsigned int, long unsigned int)’
136 | void **result_data=NULL, size_t *result_data_len=NULL,
| ^
Multiple libraries were found for “Adafruit_ZeroDMA.h”
Used: C:\Users\jobla\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.7.10\libraries\Adafruit_ZeroDMA
Not used: C:\Users\jobla\Documents\Arduino\libraries\Adafruit_Zero_DMA_Library
exit status 1
invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]
This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.
********************** end of error message output **********************************
On the openmv3 I have: “image_transfer_raw_as _the_remote_device_1.py” on the other end. At this point I’m just trying to get some communication between the two boards working. But the error on the arduino IDE side is a show stopper for me. Maybe I’m misunderstanding the rpc examples entirely and they won’t do what I need and I need to implement my own code to handle the send/receive interaction between the openmv3 and the Feather m4; if that’s the case, please let me know and I’ll move on. If what I’m trying to do is practical using the examples as templates, I’d like to know that and perhaps someone has insight into my compile error. One other alternative I have is to run uPython on the Feather m4 and do it all via python code.