HAHA!! Es läuft! Dann lag es am Ende an den Schriftarten!
Vielen, vielen Dank!
HAHA!! Es läuft! Dann lag es am Ende an den Schriftarten!
Vielen, vielen Dank!
Habe jetzt nen frisches Stretch lite aufgesetzt, jetzt hab ich endlich die beiden spidev0 und spidev1 in der Liste. Jetzt kommt die Meldung:
pi@raspberrypi:~/paper/rsp/python $ python main2.py
Traceback (most recent call last):
File "main2.py", line 59, in <module>
main()
File "main2.py", line 39, in main
font = ImageFont.truetype('/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf', 18)
File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 238, in truetype
return FreeTypeFont(font, size, index, encoding)
File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 127, in __init__
self.font = core.getfont(font, size, index, encoding)
IOError: cannot open resource
Alles anzeigen
Also er findet keine Resource? Bedeutet das das er das Display nicht findet? Ich verzweifel hier langsam echt....
Ist ja die Hat Variante, also keine einzelnen Kabel sondern einfach nur draufsetzen. Hängt ja auch nicht mit der Installation von spidev zusammen, oder? spidev müsste doch auch ohne angeschlossene Hardware angezeigt werden....
Ja, des öfteren spidev erscheint einfach nicht in der liste.
Seltsam, trotz aktivierung waren spi auskommentiert. Die config.txt sieht jetzt so aus:
GNU nano 2.2.6 Datei: config.txt
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
arm_freq=900
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on
# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
core_freq=250
sdram_freq=450
over_voltage=2
start_x=1
gpu_mem=128
max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
Alles anzeigen
Trotzdem kommt die Fehlermeldung:
pi@raspberrypi:~/epaper/python $ sudo python main.py
Traceback (most recent call last):
File "main.py", line 27, in <module>
import epd2in7
File "/home/pi/epaper/python/epd2in7.py", line 27, in <module>
import epdif
File "/home/pi/epaper/python/epdif.py", line 42, in <module>
SPI = spidev.SpiDev(0, 0)
IOError: [Errno 2] No such file or directory
bei ls /dev erscheint weiterhin kein spidev0/1
Ja, wenn ich jedoch ls /dev eingebe erscheinen spidev0 und spidev1 nicht. SPI ist jedoch aktiviert oder muss dazu noch etwas beachtet/installiert werden?
Versteh ich beim besten Willen nicht. Im dem YT Video lief es doch auch. Habe nochmal ein frisches Jessie aufgesetzt, komme aber nur zum gleichen Ergebnis. Scheinbar fehlt irgendeine Datei oder ein Verzeichnis ist falsch. Hier ist nochmal der finale Code nach dem Aufrufen von main.py
epd2in7.py epdif.pyc main - Kopie.py monocolor.bmp
epdif.py imagedata.py main.py readme.txt
pi@raspberrypi:~/paper/raspberrypi/python $ sudo python main.py
Traceback (most recent call last):
File "main.py", line 27, in <module>
import epd2in7
File "/home/pi/paper/raspberrypi/python/epd2in7.py", line 27, in <module>
import epdif
File "/home/pi/paper/raspberrypi/python/epdif.py", line 42, in <module>
SPI = spidev.SpiDev(0, 0)
IOError: [Errno 2] No such file or directory
pi@raspberrypi:~/paper/raspberrypi/python $
Alles anzeigen
OK, der Link deiner Info bezieht sich aber auf das Extension Board Pioneer600. Hängt denn das mit dem normalen Raspberry zusammen? Ich stecke das Display ja direkt auf die GPIOs.
Den Code für die Demo habe ich hier bezogen:
https://www.waveshare.com/wiki/File:2.7i…per-hat-code.7z
Da steckt im gesamten Verzeichnis keine setup.py oder ähnliches.
Ich habe grad spidev3.2 manuell von Python installiert. Hab mir das .tar.gz File geladen und auf den Raspberry geschoben.
Dort wurde es entpackt und installiert, der Befehl setup.py hat dann funktioniert.
Am Endergebnis änderte das aber nix. Es liegt evtl am Verzeichnis. Blöde Frage: Wo entpacke ich das tar.gz File denn? Habe es im Ordner /home/pi installiert.
Hm, ok:
pi@raspberrypi:~ $ ls -la
insgesamt 136
drwxr-xr-x 24 pi pi 4096 Feb 7 15:51 .
drwxr-xr-x 3 root root 4096 Jul 5 2017 ..
-rw------- 1 pi pi 5781 Feb 7 15:32 .bash_history
-rw-r--r-- 1 pi pi 220 Jul 5 2017 .bash_logout
-rw-r--r-- 1 pi pi 3512 Jul 5 2017 .bashrc
drwxr-xr-x 6 pi pi 4096 Feb 4 15:50 .cache
drwx------ 17 pi pi 4096 Feb 5 20:26 .config
-rw-r--r-- 1 pi pi 1729 Feb 4 15:08 config.txt
drwxr-xr-x 2 pi pi 4096 Feb 4 16:00 Desktop
drwxr-xr-x 5 pi pi 4096 Jul 5 2017 Documents
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Downloads
drwxr-xr-x 3 pi pi 4096 Feb 7 14:57 epaper
drwx------ 2 pi pi 4096 Feb 5 20:28 .gconf
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 .gstreamer-0.10
-rw-r--r-- 1 pi pi 26 Feb 4 16:01 .gtkrc-2.0
drwxr-xr-x 3 pi pi 4096 Jul 5 2017 .local
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Music
drwxr-xr-x 12 pi pi 4096 Feb 5 19:48 opencv-3.2.0
drwxr-xr-x 6 pi pi 4096 Dez 23 2016 opencv_contrib-3.2.0
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Pictures
drwxr-xr-x 2 pi pi 4096 Feb 7 15:51 .pip
drwx------ 3 pi pi 4096 Feb 4 15:50 .pki
-rw-r--r-- 1 pi pi 675 Jul 5 2017 .profile
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Public
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 python_games
-rw------- 1 pi pi 0 Feb 7 14:33 .python_history
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Templates
drwxr-xr-x 3 pi pi 4096 Jul 5 2017 .themes
drwx------ 4 pi pi 4096 Jul 5 2017 .thumbnails
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Videos
drwx------ 3 pi pi 4096 Feb 4 16:06 .vnc
-rw------- 1 pi pi 56 Feb 7 15:33 .Xauthority
-rw------- 1 pi pi 531 Feb 7 15:33 .xsession-errors
-rw------- 1 pi pi 531 Feb 7 14:59 .xsession-errors.old
pi@raspberrypi:~ $ cd epaper
pi@raspberrypi:~/epaper $ ls -la
insgesamt 12
drwxr-xr-x 3 pi pi 4096 Feb 7 14:57 .
drwxr-xr-x 24 pi pi 4096 Feb 7 15:51 ..
drwxr-xr-x 2 pi pi 4096 Feb 7 14:57 python
pi@raspberrypi:~/epaper $ cd python
pi@raspberrypi:~/epaper/python $ ls
epd2in7.py epd2in7.pyc epdif.py epdif.pyc imagedata.py main.py monocolor.bmp readme.txt
pi@raspberrypi:~/epaper/python $ ls -la
insgesamt 112
drwxr-xr-x 2 pi pi 4096 Feb 7 14:57 .
drwxr-xr-x 3 pi pi 4096 Feb 7 14:57 ..
-rw-r--r-- 1 pi pi 11275 Aug 22 08:11 epd2in7.py
-rw-r--r-- 1 root root 7376 Feb 7 14:57 epd2in7.pyc
-rw-r--r-- 1 pi pi 2073 Aug 15 07:07 epdif.py
-rw-r--r-- 1 pi pi 1588 Aug 15 10:38 epdif.pyc
-rw-r--r-- 1 pi pi 60875 Aug 15 07:07 imagedata.py
-rw-r--r-- 1 pi pi 2457 Feb 7 15:49 main.py
-rw-r--r-- 1 pi pi 6398 Aug 15 10:38 monocolor.bmp
-rw-r--r-- 1 pi pi 4086 Aug 15 07:07 readme.txt
pi@raspberrypi:~/epaper/python $
Alles anzeigen
Ich hoffe das du damit was anfangen kannst. Ich habe in der gezipten Datei von Waveshare nur den Raspberry Ordner auf den Raspberry gezogen, die anderen benötige ich ja nicht.
Als Anfänger will ich mal an ein erstes einfaches(?) Python Projekt wagen. Ich möchte gern einen kleinen Börsenticker auf dem Display darstellen lassen. Sollten ca. 4-6 Kurse sein, die jeweils den aktuellen und ein paar vergangene Stände anzeigen.
Wie würdet ihr da beginnen?
Ich hab mal den Workflow nach diesem Video hier befolgt. Scheint ja nicht so kompliziert zu sein..aber es klappt einfach nicht.
War nur ne andere Möglichkeit die ich gefunden hatte. Auch deine Variante schlägt fehl. Downloading ist okay, aber beim ausführen von "running setup.py" ist Schluss. Da kommen dann die Fehlermeldungen.
Ok, mit der geänderten main.py hab ich es jetzt begriffen.
Leider wirft er mir bei er install smbus-cffi einige Fehler raus:
pi@raspberrypi:~/epaper/python $
pi@raspberrypi:~/epaper/python $ pip install git+https://github.com/bivab/smbus-cffi.git
Downloading/unpacking git+https://github.com/bivab/smbus-cffi.git
Cloning https://github.com/bivab/smbus-cffi.git to /tmp/pip-R9b1eb-build
Running setup.py (path:/tmp/pip-R9b1eb-build/setup.py) egg_info for package from git+https://github.com/bivab/smbus-cffi.git
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
c/_cffi_backend.c:15:17: fatal error: ffi.h: Datei oder Verzeichnis nicht gefunden
#include <ffi.h>
^
compilation terminated.
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-R9b1eb-build/setup.py", line 48, in <module>
'Topic :: System :: Hardware',
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 262, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 287, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 631, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 874, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 886, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 338, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 636, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 666, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 856, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1078, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1066, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
Complete output from command python setup.py egg_info:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libffi' found
c/_cffi_backend.c:15:17: fatal error: ffi.h: Datei oder Verzeichnis nicht gefunden
#include <ffi.h>
^
compilation terminated.
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-R9b1eb-build/setup.py", line 48, in <module>
'Topic :: System :: Hardware',
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 262, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 287, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 631, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 874, in best_match
return self.obtain(req, installer)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 886, in obtain
return installer(requirement)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 338, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 636, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 666, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 856, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1078, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1066, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-R9b1eb-build
Storing debug log for failure in /home/pi/.pip/pip.log
pi@raspberrypi:~/epaper/python $ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=14.5 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=60 time=14.0 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=60 time=14.0 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=60 time=13.7 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 13.701/14.088/14.547/0.323 ms
pi@raspberrypi:~/epaper/python $
Alles anzeigen
Die Dateien aus dem Ordner sind lediglich die Demo Dateien, die wurden bei mir schon entpackt. Das ist dieser Demo Code den ich gepostet habe.
Was meinst du mit dem Abändern der main.py? Da stehe ich grad auf dem Schlauch.
spidev wurde schon installiert.
Ok, also hier ist die Anleitung:
https://www.waveshare.com/wiki/2.7inch_e-Paper_HAT
Es gibt auch eine Demo, aber die gibt mir nach dem Aufrufen der main.py auch nur den Fehler aus:
pi@raspberrypi:~/epaper/python $ python main.py
Traceback (most recent call last):
File "main.py", line 27, in <module>
import epd2in7
File "/home/pi/epaper/python/epd2in7.py", line 27, in <module>
import epdif
File "/home/pi/epaper/python/epdif.py", line 42, in <module>
SPI = spidev.SpiDev(0, 0)
IOError: [Errno 2] No such file or directory
pi@raspberrypi:~/epaper/python $
Alles anzeigen
Ok, dachte ich sollte das alles nacheinander eingeben.
pwd: /home/pi
pi@raspberrypi:~ $ ls -la
insgesamt 128
drwxr-xr-x 23 pi pi 4096 Feb 7 14:59 .
drwxr-xr-x 3 root root 4096 Jul 5 2017 ..
-rw------- 1 pi pi 3502 Feb 7 14:58 .bash_history
-rw-r--r-- 1 pi pi 220 Jul 5 2017 .bash_logout
-rw-r--r-- 1 pi pi 3512 Jul 5 2017 .bashrc
drwxr-xr-x 6 pi pi 4096 Feb 4 15:50 .cache
drwx------ 17 pi pi 4096 Feb 5 20:26 .config
-rw-r--r-- 1 pi pi 1729 Feb 4 15:08 config.txt
drwxr-xr-x 2 pi pi 4096 Feb 4 16:00 Desktop
drwxr-xr-x 5 pi pi 4096 Jul 5 2017 Documents
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Downloads
drwxr-xr-x 3 pi pi 4096 Feb 7 14:57 epaper
drwx------ 2 pi pi 4096 Feb 5 20:28 .gconf
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 .gstreamer-0.10
-rw-r--r-- 1 pi pi 26 Feb 4 16:01 .gtkrc-2.0
drwxr-xr-x 3 pi pi 4096 Jul 5 2017 .local
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Music
drwxr-xr-x 12 pi pi 4096 Feb 5 19:48 opencv-3.2.0
drwxr-xr-x 6 pi pi 4096 Dez 23 2016 opencv_contrib-3.2.0
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Pictures
drwx------ 3 pi pi 4096 Feb 4 15:50 .pki
-rw-r--r-- 1 pi pi 675 Jul 5 2017 .profile
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Public
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 python_games
-rw------- 1 pi pi 0 Feb 7 14:33 .python_history
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Templates
drwxr-xr-x 3 pi pi 4096 Jul 5 2017 .themes
drwx------ 4 pi pi 4096 Jul 5 2017 .thumbnails
drwxr-xr-x 2 pi pi 4096 Jul 5 2017 Videos
drwx------ 3 pi pi 4096 Feb 4 16:06 .vnc
-rw------- 1 pi pi 56 Feb 7 14:59 .Xauthority
-rw------- 1 pi pi 531 Feb 7 14:59 .xsession-errors
-rw------- 1 pi pi 531 Feb 7 14:02 .xsession-errors.old
pi@raspberrypi:~ $
pi@raspberrypi:~ $ file setup.py
setup.py: cannot open `setup.py' (No such file or directory)
pi@raspberrypi:~ $
Ist die gleiche Meldung "cannot open setup.py (no such file or directory).
Ich hab grad mal in die /usr/bin geschaut. Da sind allerdings mehrere Python Versionen enthalten (2.7.9 / 3.4)
Hi zusammen! Ich hab grad arge Probleme mein ePaper Display (2.7 inch Hat) von Waveshare zum laufen zu bekommen.
Zwar gibt es einige Tutorials und auch eine Wiki Seite von Waveshare, aber die helfen mir als blutiger Anfänger nicht viel weiter.
Ein großes Problem wo ich nicht weiterkomme ist eine Fehlermeldung bzgl. der fehlenden Python setup.py. Laut Waveshare muss ich folgendes installieren:
Python (installiert ist 2.7.9) gibt mir dann die Info "can´t open file setup.py". No such file or directory.
Aber Python ist doch installiert und reagiert ja auch auf den Befehl python.
Vielleicht hat ja einer von euch schonmal so ein ePaper Display von Waveshare installiert und kann mir weiterhelfen.
Hi, weiß einer ob es eine Limitierung der Bildauflösung im Burst-Modus gibt? Ich würde gerne innerhalb weniger Sekunden eine bestimmte Bildfolge in der maximalen (5 MP) Auflösung erstellen.
Mit welche Einstellung/Funktion könnte man Probleme mit Gegenlicht und einer verfälschten Farbausgabe entgegensteuern?
Die "Metering" Funktion brachte leider keine Ergebnisse, auch nicht die "awb" Einstellung.
Ich hab leider zur Zeit keine Beispielbilder, aber die Aufnahmen sind halt extrem dunkel oder total gelbstichig.