Open clementnuss opened 3 years ago
I have also created a python module here: https://pypi.org/project/tfluna-driver/ It might be simpler not to merge this PR in the end: keep this repo as example code, and point to my repo where I will continue to update the driver. As you prefer! Best regards, Clément
Hi clementnuss, appreciate what you've done with this. I just picked up a TF-luna so haven't gone to implement. Just curious. Is there a reason for using UART over i2c with this unit?
Hi, no reason at all. I simply reused the serial code that was already written. Feel free to implement it if you have time :)
Hi!
I spent some time refactoring this library as a "ressource" class: in the
src/
folder, you'll find the examples, as well as a python moduletfluna
. In this module, I defined theTfLuna
class, that you can use as follows :This makes using the sensor far easier, as the resource closing is handled by the
with-resource
concept, and the sensor code is centralized.