Battery management module for Python
Posted: Wed Dec 12, 2018 7:25 pm
As in my previous post I am merely a beginner, but by reading the annotated python examples, it helps to fill in the blanks and make changes. I finally got my new Flowdeck V2 and some new props to replace all the ones I broke in random crashes so ready to test out more code.
I have searched and read a few different posts in the forum about gathering battery data to use for either logging or for a gentle landing when out of range. I am wondering if any of the python wizards out there have any snippets of code that can be inserted to monitor the battery voltage and based on a value either flash the LEDs or even land when it reaches a certain percentage. I can see that being useful in many of the examples like the multiranger or other autonomous examples. Not sure if it is possible, but if there were a way to have that "module" of code accessible, it could then be invoked in other examples as needed. That way no matter what your are doing with the crazylflie, if you have the "battery power" mode "turned on" it will land when it reaches a set level. I would think this would be useful in all situations to prevent a hard fall.
Hopefully this is doable!
Thanks,
Mike
I have searched and read a few different posts in the forum about gathering battery data to use for either logging or for a gentle landing when out of range. I am wondering if any of the python wizards out there have any snippets of code that can be inserted to monitor the battery voltage and based on a value either flash the LEDs or even land when it reaches a certain percentage. I can see that being useful in many of the examples like the multiranger or other autonomous examples. Not sure if it is possible, but if there were a way to have that "module" of code accessible, it could then be invoked in other examples as needed. That way no matter what your are doing with the crazylflie, if you have the "battery power" mode "turned on" it will land when it reaches a set level. I would think this would be useful in all situations to prevent a hard fall.
Hopefully this is doable!
Thanks,
Mike