Database in OpenMV

Can we add our own library in IDE or is there any inbuilt database

Um, are you looking to add stuff to the general next gen release of OpenMV IDE, or just for one machine, or for a bunch of machines? Let me know ASAP since I’m preparing the next release and can add a new feature. Please tell me the use case and etc. Details.

like in Normal python we can install third party libraries,in the same way I want to import a library like a database library mysql or tinyDB
so if this feature will be available in the camera it will be very helpful to go more into this

Um, so, do you need a database for python on the OpenMV Cam or a way to install third party libraries using OpenMV IDE.

As for a database on python I think MicroPython added this:btree – simple BTree database — MicroPython 1.9.2 documentation

The next OpenMV Cam release includes this new feature.

Thank you

uPython BTree is only a key-value db. I am trying to use the uPython TinyDB export, but OpenMV IDE exits when I try to import TinyDB. I placed the ‘tinydb’ folder on my board, but I’m thinking that may not have been enough for an “install”.

It looks like the ‘mip’ function is not available in uPython v 1.15. Is there any plan to upgrade OpenMV to uPython 1.19.1 (the current latest version)?

Hi, we are at the latest version. However, the documentation is out of date. I am working on getting it up to date.

OpenMV IDE doesn’t run the code. Why would it exit?

Using:

from tinydb import TinyDB, Query

With other code following.
When I click run in the IDE, it pauses, then the IDE closes. I have copied the tinydb folder onto my board, and I have tried copying the entire directory that I downloaded onto the board, with the same result both ways.

Okay, I thought I was mistaken about the version. I must have been using mip wrong - would you mind telling me how to use it in the IDE?

Huh, the IDE is probably trying to copy the library onto your board. It has some code in it that tried to do this for you.

Is the library in the OpenMV folder in your documents directory? If so, can you just make sure that folder is empty of anything.

Here is what the board’s directory looks like.

Sorry, there should be a OpenMV folder in your documents directory, is there anything in there? If it’s empty then the IDE shouldn’t be trying to copy libraries from it and crahsing.

I put the tinydb folder in the OpenMV folder on my computer. When I click ‘run’ in the IDE, it asks if I want to copy to the board; I click ‘yes’, and it crashes and exits.

Yes, don’t put anything in that folder. Just put the library on your OpenMV Cam directly.

If I just open a terminal to the board and don’t run it through the main window, it seems to work.

Yes, but, as long as there’s nothing in the folder on the PC the IDE won’t try to sync files and crash.

Also, can you share a zip of the files and create a github ticket on the IDE about this?

Thanks,

Done. Thanks.