NEWBIE: how to get text onto 2 lines on a 16x2 lcd display
RobH
rob at despammer.com
Sat Sep 28 15:17:33 EDT 2019
On 28/09/2019 15:59, Dennis Lee Bieber wrote:
> On Fri, 27 Sep 2019 19:46:58 +0100, RobH <rob at despammer.com> declaimed the
> following:
>
>>
>> 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.
>>
>
> Were you in the Python3 interpreter? That error (I presume it was
> "bash:...") means you typed the line at the console shell, not into a
from: can't read /var/mail/Python3from shell console
> Python interpreter.
>
> pi at raspberrypi:~$ #from shell console
> pi at raspberrypi:~$ import adafruit_blinka
> -bash: import: command not found
> pi at raspberrypi:~$ #from Python3 interactive interpreter
> 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
>>>> exit()
> pi at raspberrypi:~$
>
>
>> I should say that this is on a raspberry pi zero w, if it makes any
>> difference.
>
> It doesn't... All R-Pi system use a default OS of Raspbian (a Debian
> modified for R-Pi specific booting and support) {caveat: if using a NOOBS
> installer with active WiFi one does have the option of installing any one
> of half a dozen OSes, though some are quite specific in usage: Windows IoT,
> media player...}
>
> It doesn't even matter if one is using a BeagleBone Black, since that
> also runs Debian (though R-Pi has updated to "Buster" while the BBB is
> still on "Stretch" [ver 10 vs ver 9]).
>
> debian at beaglebone:~$ #from shell console
> debian at beaglebone:~$ import adafruit_blinka
> -bash: import: command not found
> debian at beaglebone:~$ #from Python3 interactive interpreter
> debian at beaglebone:~$ python3
> Python 3.5.3 (default, Sep 27 2018, 17:25:39)
> [GCC 6.3.0 20170516] on linux
from: can't read /var/mail/Python3from shell console
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import adafruit_blinka
>>>> exit()
> debian at beaglebone:~$
>
> It does matter if you try from a system that doesn't support embedded
> programming -- Debian 10 running in a VirtualBox instance on a Window10
> computer...
>
> Actually -- it did do something
>
> wulfraed at debian:~$ import adafruit_blinka
> wulfraed at debian:~$
> wulfraed at debian:~$ ls -l
> total 11704
> -rwxrwx--- 1 wulfraed vboxsf 11909039 Sep 28 10:48 adafruit_blinka
> drwxrwxrwx 2 wulfraed wulfraed 4096 Sep 13 15:56 Desktop
> drwxrwxrwx 3 wulfraed wulfraed 4096 Sep 13 14:20 Documents
> drwxrwxrwx 2 wulfraed wulfraed 4096 Sep 13 13:53 Downloads
> drwxr-xr-x 3 wulfraed wulfraed 4096 Sep 13 15:18 eclipse
> drwxr-xr-x 4 wulfraed wulfraed 4096 Sep 13 15:25 eclipse-workspace
> drwxrwxrwx 5 wulfraed wulfraed 4096 Sep 11 11:33 ga
> drwxrwxrwx 7 wulfraed wulfraed 4096 Sep 11 13:58 Mail
> drwxrwxrwx 2 wulfraed wulfraed 4096 Sep 11 10:43 Music
> drwxrwxrwx 2 wulfraed wulfraed 4096 Sep 11 10:43 Pictures
> drwxrwxrwx 2 wulfraed wulfraed 4096 Sep 11 10:43 Public
> drwxrwxrwx 3 wulfraed wulfraed 4096 Sep 17 14:33 Scratch
> drwxrwxrwx 3 wulfraed wulfraed 4096 Sep 13 15:15 temp
> drwxrwxrwx 2 wulfraed wulfraed 4096 Sep 11 10:43 Templates
> -rwxrwxrwx 1 wulfraed wulfraed 8984 Sep 13 13:49 testcross
> -rwxrwxrwx 1 wulfraed wulfraed 124 Sep 13 13:32 testcross.cpp
> drwxrwxrwx 2 wulfraed wulfraed 4096 Sep 11 10:43 Videos
>
> It created a large file that, on examination, is an EPS image file of my
> Debian desktop! "import" appears to be a command supplied as part of
> "ImageMagick" conversion utility.
>
> After removing the file, the Python3 interpreter reports
>
> wulfraed at debian:~$ python3
> Python 3.7.3 (default, Apr 3 2019, 05:39:12)
> [GCC 8.3.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import adafruit_blinka
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ModuleNotFoundError: No module named 'adafruit_blinka'
>>>> exit()
> wulfraed at debian:~$
>
> as expected, since the AdaFruit libraries are not installed on a desktop
> machine.
>
>
>
>
>
>
>
>
No I wasn't in the Python3 interpreter, and typing
Python3 gets me into, I assume.
Then typing:
import adafruit_blinka seemed to work as there were no errors.
Thanks
More information about the Python-list
mailing list