Comments (17)
@cdgriffith Works like a charm! Thanks so much!
from darkroom.
Sorry for missing your first post!
Do you have a X server running at all or headless only? I have only had this issue when SSHing without X forwarding enabled, however I'm pretty sure the pis I used were desktop edition.
If you don't want to install a full x server, xcfb
may work
from darkroom.
@cdgriffith Ok, so I started over on a desktop version and rolled back to the previous Raspbian so I'd likely be on the same one you used. I no longer get the x server error, but now rather this error
Traceback (most recent call last):
File "darkroom/main.py", line 11, in <module>
from darkroom.enlarger import Enlarger
ImportError: No module named darkroom.enlarger
from darkroom.
@cdgriffith I managed to get it running by changing "darkroom.enlarger" to "enlarger", but the LED always remains "00.0", so that must have broken something. The "enter" does still switch the relay, so its not that it doesn't recognize the key pad. I also can't get the script to run at startup, I dont know if there is something I am supposed to do to activate the rc.local file or what
from darkroom.
If you are getting that import error, it's probably becasue the python path isn't set correctly, which I would extrapolate to thinking is causing the issue with rc.local
if you changed the code.
You should be one level outside the code directory, and have the python path set there. For example, if it's extracted to /home/pi/darkroom
# after changing code back to darkroom.enlarger
PYTHONPATH=/home/pi/darkroom python3 /home/pi/darkroom/darkroom/main.py
To see why it isn't working for rc.local
I suggest capturing the output and seeing what the log says:
PYTHONPATH=/home/pi/darkroom python3 /home/pi/darkroom/darkroom/main.py > /home/pi/darkroom/log.txt 2>&1
from darkroom.
@grainsoflight did you try the example program for the luma devices to make sure they work? https://luma-led-matrix.readthedocs.io/en/latest/install.html#examples
Edit: Just realized you said it stays at 00.0, so of course it works, doh. Sorry for sleepy morning ideas.
from darkroom.
@cdgriffith do you recall if you set this up on Stretch or Jessie? I want to try and set it up with the fewest differences as possible
from darkroom.
I believe it was Stretch. Tomorrow I will try to connect to it and do a pip freeze to get a set of package versions.
from darkroom.
from darkroom.
I didn't have an easy way to pip freeze, so I simply pulled the SD card and copied the details from the site-lib packages of the venv it was using:
Raspbian GNU/Linux 9
python 3.7
luma.led_matrix-1.0.8
pynput-1.4
six-1.11.0
python_xlib-0.23
gpiozero-1.4.1
Pillow-5.2.0
RPi.GPIO-0.6.3
smbus2-0.2.1
spidev-3.2
luma.core-1.8.0
setuptools-39.0.1
spidev.cpython-37m-arm-linux-gnueabihf.so
luma.core-1.8.0
luma.led_matrix-1.0.8
simpleaudio-1.0.2
So I think it should work if you update requirements to:
pynput==1.4
luma.led_matrix==1.0.8
luma.core==1.0.8
gpiozero==1.4.1
simpleaudio==1.0.2
pillow==5.2.0
RPi.GPIO==0.6.3
I was using a system service it seems, not sure why the article lists the rc.local
file instead (probably switched and forgot to update)
# /etc/systemd/system/darkroom.service
[Unit]
Description=darkroom
After=graphical.target
[Service]
Restart=on-failure
RestartSec=20
User=pi
Enviroment="XAUTHORITY=/home/pi/.Xauthority"
Enviroment="DISPLAY=:0"
WorkingDirectory=/home/pi
ExecStart=/home/pi/venv/bin/python darkroom/main.py
[Install]
WantedBy=multi-user.target
from darkroom.
@grainsoflight I hope that solves the issue for you, if not I have a new dot matrix display coming on Wednesday and plan on doing an overhaul on the article with updated details and then create a fixed version release with everything set in stone working. (Possibly do a Pyinstaller binary or something)
I plan to get this to a point I am confident it won't need updated again (version lock, binary release backup) and then archive it :)
from darkroom.
@cdgriffith , that would be awesome. I will try with the details above and see if I can get it working, thanks
from darkroom.
I am actually having the same types of issues you are. I am re-writing it to take standard input instead, so it will just be the last command in ~/.bashrc
and not need anything fancy like the pynut keyboard listener.
from darkroom.
from darkroom.
@grainsoflight Ok switched everything over. https://github.com/cdgriffith/darkroom/tree/development
Walk through the installation on the development README page (after cloning the repo, switch to development branch, git checkout development
) and let me know how it goes!
from darkroom.
from darkroom.
Just a warning, if you add it to .bashrc
as suggested, that this is designed so it "takes over" your bash console on login. You can always stop the program by hitting "e" or "Ctrl+C"
Also looking at the charts again, the IoT pin image is wrong. It is meant to be GPIO 18 / Raspberry Pi Pin 12
from darkroom.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darkroom.