Hi,
I’m trying to get the void exe_color_detection to work over UART communication between an Arduino Wifi Rev2 and an OpenMV Cam H7 R2. I managed to get the IDE to run and connect with the camera and setting the ‘popular_features_as_the_remote_device.py’ as main.py on the cam.
However on the Arduino side (after installing the OpenMV Arduino RPC library and then nagivating to File > Examples > OpenMV Arduino RPC > popular_features_as_the_controller_device_example I get errors when trying to compile for the board.
Mainly ‘‘rpc_hardware_serial1_uart_master’ in namespace ‘openmv’ does not name a type’ this happens after uncommenting the line: openmv::rpc_hardware_serial1_uart_master interface(115200)
Full crash log is below, any thoughts? Thanks!
Arduino: 1.8.20 Hourly Build 2022/04/25 09:35 (Mac OS X), Board: “Arduino Uno WiFi Rev2, ATMEGA328”
popular_features_as_the_controller_device_example:70:9: error: ‘rpc_hardware_serial1_uart_master’ in namespace ‘openmv’ does not name a type
openmv::rpc_hardware_serial1_uart_master interface(115200);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
popular_features_as_the_controller_device_example:81:9: error: ‘rpc_software_serial_uart_master’ in namespace ‘openmv’ does not name a type
openmv::rpc_software_serial_uart_master interface(2, 3, 19200);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/folders/xp/8d7vzmzj5zb_8dy2z9nl01pw0000gn/T/arduino_modified_sketch_335468/popular_features_as_the_controller_device_example.ino: In function ‘void setup()’:
popular_features_as_the_controller_device_example:91:5: error: ‘interface’ was not declared in this scope
interface.begin();
^~~~~~~~~
/var/folders/xp/8d7vzmzj5zb_8dy2z9nl01pw0000gn/T/arduino_modified_sketch_335468/popular_features_as_the_controller_device_example.ino: In function ‘void exe_face_detection()’:
popular_features_as_the_controller_device_example:102:9: error: ‘interface’ was not declared in this scope
if (interface.call_no_args(F(“face_detection”), &face_detection_result, sizeof(face_detection_result))) {
^~~~~~~~~
/var/folders/xp/8d7vzmzj5zb_8dy2z9nl01pw0000gn/T/arduino_modified_sketch_335468/popular_features_as_the_controller_device_example.ino: In function ‘void exe_person_detection()’:
popular_features_as_the_controller_device_example:118:9: error: ‘interface’ was not declared in this scope
if (interface.call_no_args(F(“person_detection”), buff, sizeof(buff) - 1)) {
^~~~~~~~~
/var/folders/xp/8d7vzmzj5zb_8dy2z9nl01pw0000gn/T/arduino_modified_sketch_335468/popular_features_as_the_controller_device_example.ino: In function ‘void exe_qrcode_detection()’:
popular_features_as_the_controller_device_example:126:9: error: ‘interface’ was not declared in this scope
if (interface.call_no_args(F(“qrcode_detection”), buff, sizeof(buff) - 1)) {
^~~~~~~~~
/var/folders/xp/8d7vzmzj5zb_8dy2z9nl01pw0000gn/T/arduino_modified_sketch_335468/popular_features_as_the_controller_device_example.ino: In function ‘void exe_apriltag_detection()’:
popular_features_as_the_controller_device_example:134:9: error: ‘interface’ was not declared in this scope
if (interface.call_no_args(F(“apriltag_detection”), &apriltag_detection_result, sizeof(apriltag_detection_result))) {
^~~~~~~~~
/var/folders/xp/8d7vzmzj5zb_8dy2z9nl01pw0000gn/T/arduino_modified_sketch_335468/popular_features_as_the_controller_device_example.ino: In function ‘void exe_datamatrix_detection()’:
popular_features_as_the_controller_device_example:150:9: error: ‘interface’ was not declared in this scope
if (interface.call_no_args(F(“datamatrix_detection”), buff, sizeof(buff) - 1)) {
^~~~~~~~~
/var/folders/xp/8d7vzmzj5zb_8dy2z9nl01pw0000gn/T/arduino_modified_sketch_335468/popular_features_as_the_controller_device_example.ino: In function ‘void exe_barcode_detection()’:
popular_features_as_the_controller_device_example:158:9: error: ‘interface’ was not declared in this scope
if (interface.call_no_args(F(“barcode_detection”), buff, sizeof(buff) - 1)) {
^~~~~~~~~
/var/folders/xp/8d7vzmzj5zb_8dy2z9nl01pw0000gn/T/arduino_modified_sketch_335468/popular_features_as_the_controller_device_example.ino: In function ‘void exe_color_detection()’:
popular_features_as_the_controller_device_example:169:9: error: ‘interface’ was not declared in this scope
if (interface.call(F(“color_detection”), color_thresholds, sizeof(color_thresholds), &color_detection_result, sizeof(color_detection_result))) {
^~~~~~~~~
exit status 1
‘rpc_hardware_serial1_uart_master’ in namespace ‘openmv’ does not name a type