Skip to content

Commit

Permalink
Docs: Add troubleshooting section
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrgn committed Feb 16, 2019
1 parent 56a0dbb commit 65585a0
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 5 deletions.
5 changes: 0 additions & 5 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,6 @@ change the corresponding parameters. Here's a full example:
charmap='A02',
auto_linebreaks=True)

If you've been experiencing `issues <https://github.com/dbrgn/RPLCD/issues/70>`_
with garbled text occasionally on initialization/use of the display, try setting
the parameter ``compat_mode=True``, which allows for better interoperability with
slower displays.

Writing Data
~~~~~~~~~~~~

Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Contents
installation.rst
getting_started.rst
usage.rst
troubleshooting.rst
api.rst


Expand Down
52 changes: 52 additions & 0 deletions docs/troubleshooting.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Troubleshooting
###############


Compatibility Mode
==================

Not all LCDs are made equal. It appears that some devices (especially those with
non-original HD44780 controllers) don't run at the reference clock, and as such,
are out of specification when it comes to timings.

If you’ve been experiencing `issues
<https://github.com/dbrgn/RPLCD/issues/70>`__ with garbled text occasionally on
initialization/use of the display, try enabling the compatibility mode by
passing ``compat_mode=True`` to the ``CharLCD`` constructor.


TypeError: this constructor takes no arguments
==============================================

If you're getting this error, you are probably importing the ``CharLCD`` class
the wrong way. If you use parallel (GPIO) mode, you should use ``from RPLCD.gpio
import CharLCD``. If you use I²C mode, you should use ``from RPLCD.i2c import
CharLCD``.


ValueError: Invalid GPIO numbering mode
=======================================

Since version 1.0.0, you need to explicitly specify the pin numbering mode. So
if you're getting this error:

::

ValueError: Invalid GPIO numbering mode: numbering_mode=None, must be
either GPIO.BOARD or GPIO.BCM

...then you need to pass in the ``numbering_mode`` explicitly:

.. sourcecode:: python

import RPi.GPIO as GPIO

# For BOARD numbering
lcd = CharLCD(..., numbering_mode=GPIO.BOARD)

# For BCM numbering
lcd = CharLCD(..., numbering_mode=GPIO.BCM)

The numbering mode is important, if you're unsure which one to use, search on
Google/DuckDuckGo to learn about the differences between the two numbering
modes.

0 comments on commit 65585a0

Please sign in to comment.