what version of MicroPython is it?

I’m trying to read data in from a json file and ensure that it is string type. In the official docs the conversion would be done like so;

https://docs.micropython.org/en/latest/genrst/builtin_types.html#str

print(str(b'abc', encoding='utf8'))

On the cam that code results in;
“NotImplementedError: keyword argument(s) not yet implemented - use normal args instead”

1.11 with some upstream patches.

I see that the _thread module is present in the FW. I have some code from elsewhere that uses threads and trying to port it, but the thread function isn’t being called. Is _thread fully implemented in the H7?

Documentation is here;
https://docs.python.org/3.5/library/_thread.html#module-_thread

When I call;
_thread.start_new_thread(function, args[, kwargs])

… it executes without complaint but the function doesn’t appear to run.

No threading is not supported, you’re going to have to use timer callbacks.

I’m looking at your timer_control.py example.

def tick(timer):            
    blue_led.toggle()
    
tim = Timer(4, freq=1)      # create a timer object using timer 4 - trigger at 1Hz
tim.callback(tick)          # set the callback to our tick function

I assume timer 4 is a hardware timer? How many timers are there and what are the available numbers?

Hi, you should be able to use all the timers (up to 17 on the H7) except 1,3,4,5, 6 which are reserved for other stuff. I was just double checking timers on the H7 before I reply and found out that not all of them are working as expected, I’m going to fix this in the next couple of days and send patches to micropython. For now you can use tim 2, 12, 14 (and 4 and 6 if you must) I’ll keep you posted on this.

Interesting! Thanks for the info. I am thinking I will write a general-purpose wrapper class that keeps track of what timers are available so other code doesn’t have to know.

Hi, the issues with timers have been fixed, if you update to the latest firmware on github you can use TIM2, TIM3 and TIM7->TIM14 on the F7/OMV3 and TIM2,TIM3,TIM7,TIM8 and TIM12->TIM17 on the H7/OMV4.

Fast work, you are the man! I downloaded the release zip and extracted, not sure which directory to use. OPENMV4? OPENMV4R?

Nevermind, found in another thread;
“The OPENMV4/firmware.bin is the right file to use.”