C:\Arduino-1.8.19\portable\packages\arduino\hardware\mbed_portenta\3.1.1\libraries\Camera\src\camera.cpp: In function 'void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef*)':
C:\Arduino-1.8.19\portable\packages\arduino\hardware\mbed_portenta\3.1.1\libraries\Camera\src\camera.cpp:120:27: error: 'DCMI_TIM' was not declared in this scope
if (htim->Instance == DCMI_TIM) {
Sound PDM seems to work on both the Portenta M4 and M7 cores. Of course on the M4 core serial print does not work on the M4 and cool tricks using RPC seem to give the red flash of death, but just activating the LED’s red, green, blue: LEDR, LEDG, LEDB seems to work.
Acceleration might work on the M4 core, it compiled and while I was messing with LED’s I lost the serial port. The Portenta just flashes red once on plugin and I can’t seem to connect to it. Possibly bricked another one.
Same issue on the Portenta M4 for Classification as for FOMO
C:\Arduino-1.8.19\portable\packages\arduino\hardware\mbed_portenta\3.1.1\libraries\Camera\src\camera.cpp: In function 'void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef*)':
C:\Arduino-1.8.19\portable\packages\arduino\hardware\mbed_portenta\3.1.1\libraries\Camera\src\camera.cpp:120:27: error: 'DCMI_TIM' was not declared in this scope
if (htim->Instance == DCMI_TIM) {
@rjames any suggestions? I am going to try a few camera sketches from here on the M4 core.
I successfully got the Arduino example “portenta_h7_microphone_continuous” running on the M4. Debug statements are sent to the M7 via RPC with the M7 doing the Serial.println().
I cut out a function but not sure if that is a good idea, but it works. Waiting for a reply from Arduino. I will try testing it tonight on a FOMO model.
…
Sad to say my first FOMO attempt compiled but I have no proof if it worked. I will try again tomorrow.
Yeh, took a long time to get to that point, see these deprecated examples (all done 2 years ago!). I am testing if I can get RPC on the M4 working with Edgeimpulse. I assume the problem is the ie_printf() command but on closer inspection of an exported arduino library (…src\edge-impulse-sdk\porting\arduino\ei_classifier_porting.cpp) it does seem to eventually do a Serial.print()
Presently not getting anything from ei_printf() through RPC , perhaps one of the Pro’s could voice an opinion.
I would just get 64x64 FOMO working on M4 and then increase the size. I use an OLED to view my output (Really worth $12.99 USD 1.5inch OLED display Module, 128x128 pixels, 16 gray scale, SPI/I2C interface) so that is probably trashing a fair bit of my memory allocation. I should try a model with just the LED output (as serial through RPC is a pain) and see how big it can go. After 96x96 things on M7 get tricky. I would like 160x160 but that hits a memory limit however I have not tried @louis suggestion of the smaller mobileNet.
Not sure either way, but I do have a 64x64 model working from the M4 core with RPC here, but as I try to print more info with Serial.print I get the dreaded TFlite Arena error issue, which I don’t want to use the local.boards.txt trick to solve.
Predictions
x:32, y:24
Starting inferencing in 0 microseconds...
Taking photo...
Predictions
x:32, y:24
Starting inferencing in 0 microseconds...
Taking photo...
Easiest way to do the example is to load my “Portenta Pro Community Solutions” library in your Arduino IDE (search for community) and load one of the FOMO models to get the include file setup (dot514 folder) and then replace the main code with the above code.
the 64x64 model I am using is in the same folder but is really badly trained on a simple red cup so it is not the best model to use. I will use a better 3 object model when I test more.
So I am getting 80x80 FOMO working on M4 with RPC and LED’s but I solved an issue. Printing confidence values as a float is a pain. Easier to x100 print the integer with “0.” in front of it.
By the way Arduino MBED boards version 3.2.0 was released quietly about 6 days ago, and I checked and my changes to make the M4 core do vision is in the camera.cpp code. Hopefully it works by default now.
#if defined (ARDUINO_PORTENTA_H7_M7) || defined (ARDUINO_PORTENTA_H7_M4)
I haven’t re-tested it, but hopefully small M4 vision models now work.