How to write my own function in C and call it in python using the IDE?

Discussion related to "under the hood" OpenMV topics.
sumedh2670
Posts: 5
Joined: Tue Oct 01, 2019 1:27 am

How to write my own function in C and call it in python using the IDE?

Postby sumedh2670 » Mon Nov 11, 2019 8:08 am

Hello,
I am using OpenMV Cam H7 and I have made a setup IDE in linux environment as per the document https://github.com/openmv/openmv/wiki. I have a query regarding how to write my own C functions and call it thru the IDE via python code. I have read this thread viewtopic.php?f=6&t=48&p=224&hilit=helper#p224 but my openmv folder which i downloaded from the openmv github page does not contain path
/openmv/src/micropython/stmhal/qstrdefsport.h
as stated in the thread. Please help..
User avatar
kwagyeman
Posts: 4271
Joined: Sun May 24, 2015 2:10 pm

Re: How to write my own function in C and call it in python using the IDE?

Postby kwagyeman » Mon Nov 11, 2019 4:06 pm

The file is under "src/omv/py/qstrdefsport.h"
Nyamekye,
sumedh2670
Posts: 5
Joined: Tue Oct 01, 2019 1:27 am

Re: How to write my own function in C and call it in python using the IDE?

Postby sumedh2670 » Fri Nov 15, 2019 7:04 am

Hi, THanks for the reply. I am using the FLIR Lepton Adapter Module with OpenMV H7 board. As suggested in the Flir Lepton3.5 datasheet, the FOV of the said lens is 71x57 [degrees]. I searched for a better thermal lens with wide FOV than the Lepton 3.5 and found a new thermophile sensors from Heimann Sensors https://www.heimannsensor.com/Datasheet ... d_Rev8.pdf with L5.0 lens which has a better FOV of 88 x 70 [degrees]. I am thinking of attempting to integrate that sensor module with the OpenMV platform as I find it awesome and easy to use. Is it doable?
Do you have any other thermal module supported which have good FOV?
User avatar
kwagyeman
Posts: 4271
Joined: Sun May 24, 2015 2:10 pm

Re: How to write my own function in C and call it in python using the IDE?

Postby kwagyeman » Fri Nov 15, 2019 11:54 am

Just the MLX90340. See the GitHub and look at whole the py_fir.c module works.
Nyamekye,
sumedh2670
Posts: 5
Joined: Tue Oct 01, 2019 1:27 am

Re: How to write my own function in C and call it in python using the IDE?

Postby sumedh2670 » Wed Nov 20, 2019 12:57 am

Thanks! I'll look into it...
And congratulations for being a Judge on the Hackaday Superconference! I saw it on youtube, the event was awesome!
User avatar
kwagyeman
Posts: 4271
Joined: Sun May 24, 2015 2:10 pm

Re: How to write my own function in C and call it in python using the IDE?

Postby kwagyeman » Wed Nov 20, 2019 2:12 am

Thanks!
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 15 guests