I have a sensor value which can be read using the C++ only because it was implemented using it , I want to pass location value (two float variable) of one sensor to Python. I have been reading a lot and I found shared memory , piping and more any idea what is the best way to do it ?
It's not clear from your question whether this is a standalone C++ program or a library.
If it's a standalone program, use the subprocess module to invoke it and read its output.
If it's a library, use Cython to construct a Python extension module that wraps the library. (It is not necessary to use Cython; Python extensions can be written by hand. But it will make the task significantly easier.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With