Sensor.get_id() output

Hi,

i recently bought my H7 R2 and i really like it. So first of all a massive respect for your work!
When i try to read out the camera id i do get “9345” as output instead of something with a MT9M114.
How comes?

Also whenever i try to set the resolution to something above VGA in the helloworld.py (i.e. WXGA) i get a RuntimeError: Frame size is not supported or is not set
Any ideas?

Thanks in advance!

Hi, get_id returns the sensor’s ID register, and the VGA res is the max you can set on the H7 camera.

Hi,

OK, i thought that sensor.get_id() somehow gives the type of camera i am using. Thanks a lot for your answer!

what i still don’t understand is why this line works:

if sensor.get_id() ==  sensor.OV7725 :

wheras this one

if sensor.get_id() ==  sensor.MT9M114 :

gives me:

AttributeError: ‘module’ object has no attribute ‘MT9M114’

Hi, it looks like that macro is missing:

Hi, this would explain the error. So i would need to add this line and (re)compile with the firmware? Neved did that, but I’ll give it a try :slightly_smiling_face:

Adding:

{ MP_OBJ_NEW_QSTR(MP_QSTR_MT9M114), MP_OBJ_NEW_SMALL_INT(MT9M114_ID)},

Would fix.

Fixed: