osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NEWBIE: how to get text onto 2 lines on a 16x2 lcd display


On 27/09/2019 15:28, Dennis Lee Bieber wrote:
> On Fri, 27 Sep 2019 10:48:29 +0100, RobH <rob at despammer.com> declaimed the
> following:
> 
>> Ok, the adafruit_character_lcd is in the same directory as yours, and so
>> is Blinka and Purio. It seems to be a bit of a long path to type to get
>> to the Adafruit_Charlcd directory, but is there a shortcut way of
>> getting to the said directory.
>>
> 
> 	Other than to examine the source code of the library you have no need
> to specify the directory... Within a Python script, a plain "import" should
> work.
> 
> pi at raspberrypi:~$ python3
> Python 3.7.3 (default, Apr  3 2019, 05:39:12)
> [GCC 8.2.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import adafruit_blinka
>>>> import adafruit_character_lcd as acl
>>>> dir(acl)
> ['__doc__', '__file__', '__loader__', '__name__', '__package__',
> '__path__', '__spec__']
>>>> help(acl)
> 
> 
> Help on package adafruit_character_lcd:
> 
> NAME
>      adafruit_character_lcd
> 
> PACKAGE CONTENTS
>      character_lcd
>      character_lcd_i2c
>      character_lcd_rgb_i2c
>      character_lcd_spi
> 
> FILE
>      (built-in)
> 
> (END)
>>>> from adafruit_character_lcd import character_lcd as cl
>>>> help(cl)
> Help on module adafruit_character_lcd.character_lcd in
> adafruit_character_lcd:
> 
> NAME
>      adafruit_character_lcd.character_lcd
> 
> DESCRIPTION
>      `adafruit_character_lcd.character_lcd`
>      ====================================================
> 
>      Module for interfacing with monochromatic character LCDs
> 
>      * Author(s): Kattni Rembor, Brent Rubell, Asher Lieber,
>        Tony DiCola (original python charLCD library)
> 
>      Implementation Notes
>      --------------------
> 
>      **Hardware:**
> 
>      "* `Adafruit Character LCDs <http://www.adafruit.com/category/63_96>`_"
> 
>      **Software and Dependencies:**
> 
>      * Adafruit CircuitPython firmware:
>        https://github.com/adafruit/circuitpython/releases
>      * Adafruit's Bus Device library (when using I2C/SPI):
>        https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
> 
> CLASSES
> {AND MUCH MORE}
> 
> 

Thanks for all that information, but first of all using just import 
adafruit blinka did not work as it returned bas: import: command not found.

I should say that this is on a raspberry pi zero w, if it makes any 
difference.