pimoroni / flotilla-python

Python library for the Pimoroni Flotilla plug-and-play electronics ecosystem
MIT License
25 stars 15 forks source link

Some additions to the Number module #20

Closed graycrow closed 8 years ago

graycrow commented 8 years ago

Hi. I added some extra methods to the Number module to set the segments (colon, apostrophe) and the property (brightness) which wasn't possible to set in the original version of the module, plus I added 7-segment font and methods to display a string (which sets dots/commas and colon in the proper segments when it finds them in the string) and some helper methods to display a char in the particular "digit", display (set) current time and format a float value as temperature and display it.

I hope this would help someone. I know that you guys are extremely busy, so just please let me know what do you think about this additions when you will have time.

Gadgetoid commented 8 years ago

Awesome stuff, thank you! I've tested this and merged it in. I made a slight tweak to add an encoding declaration which may only affect Python 2. Seems to work in 2 and 3, and I wrote a quick example number-text.py to demonstrate it.