dbrgn / RPLCD

A Raspberry Pi LCD library for the widely used Hitachi HD44780 controller, written in Python. GPIO (parallel) and I²C modes supported.
https://rplcd.readthedocs.io/en/latest/
MIT License
261 stars 72 forks source link

fix contrast none #97

Closed makslevental closed 5 years ago

dbrgn commented 5 years ago

Why does it matter whether the contrast is set to None if it's not being used?

:param contrast: A value between 0 and 1, specifying the initial LCD
    contrast. Default: 0.5. Has no effect if pin_contrast is ``None``
makslevental commented 5 years ago

@dbrgn don't understand? without this line i get an exception from here

https://github.com/dbrgn/RPLCD/blob/b865e0bf058adc44df46f977ac1d6ae7b10af9b6/RPLCD/pigpio.py#L285

dbrgn commented 5 years ago

Oh, sorry, I missed that contrast is a property, and not a plain attribute :slightly_smiling_face: