-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple powered up led #387
Conversation
I think other stores are better than supporting amazon.
Adopted shopping list in terms of - buttons - led including resistor - power pack - RJ45 adapter - USB charging outlet - Jumper cables for buttons - Visaton speaker and amp
Status led shows if phoniebox ist in service to an LED connected to GPIO 2
Install script no longer deletes old gpio-button service but already more general gpio service. Small code improvements to LED script.
GPIO service still called old gpio-buttons script
Now gpio gets removed instead of gpio-buttons
- Returning USB speakers - Received components
Led blinks for half a second off and half a second on after pressing and during shutdown.
Led blinks two times and stays on until shutdown completes. This fixes that the led randomly goes off caused by continued blinking and shutdown.
Conflicts: misc/sampleconfigs/gpio-buttons.py.sample Merged into gpio.py.sample
Imported comment from upstream. Commented led behavior when shutting down.
Some changes from fork master were in the led only change branch. Fixed it. Now just the led change should be in this branch.
Conflicts: README.md scripts/installscripts/stretch-install-default.sh
I think this will not destroy the "no soldering" solution, because one can easily ignore the led like the gpio buttons. |
I have not checked the update conditions in detail. I fyou want to merge we should concider the renamed file (gio-buttons.py to gpio.py) in the install script(s). |
This is a small video of the functionality. |
@@ -482,30 +482,30 @@ echo "### Deleting older versions of service daemons. This might throw errors, i | |||
sudo systemctl disable idle-watchdog | |||
sudo systemctl disable rfid-reader | |||
sudo systemctl disable startup-sound | |||
sudo systemctl disable gpio-buttons |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should stay for a while I guess right?
sudo rm /etc/systemd/system/rfid-reader.service | ||
sudo rm /etc/systemd/system/startup-sound.service | ||
sudo rm /etc/systemd/system/gpio-buttons.service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should stay for a while I guess right?
Hi @topas-rec, GPIO 3 is not free, it is currently GPIO to power up and down and can not be chnaged to other pins (wake-up is special pin requirement). |
Hi @topas-rec @martinclausen2 |
Hi @topas-rec , a suggestion GPIO 7 is free. |
Can you confirm that and then tell me if this gpio is free? That's why I didn't believe there is a conflict between the led and the shutdown button, because I use them together. |
OK found out that the gpio 2 is a conflict for the i2c protocol for the hifiberry. Correct? |
Hi @topas-rec |
Jepp. Thats why I changed to the develop branch. Getting this fix into this PR can be done in one shot instead of doing it later when merging develop in master. |
This PR was targeted to master. In master the |
simple_powered_up_led Conflicts: misc/sampleconfigs/gpio-buttons.py.sample misc/sampleconfigs/phoniebox-rfid-reader.service.stretch-default.sample scripts/RegisterDevice.py scripts/installscripts/buster-install-default.sh All files taken over except of gpio-buttons.py.sample
I'll test this soon. If someone can test it that would help. I think this can be merged already since the GPIO and LED code was already tested before. |
Tested with current buster install script (develop branch) and with GPIO 12. Works right after install and works as expected. Please merge. |
Hi @topas-rec , |
Hi @veloxidSchweiz a year oago I removed carefully gpio.zero for performance reasons: |
Hi @martinclausen2 , |
Can someone of the maintainers please explain to me why this is not going to be merged or rejected? I see a lot of discussion going on around config files and reorganizing the project. I think that is all great. Does it has to do with this PR? Is that the reason that this PR is not merged? Are there other reasons? This PR is open for a year now and I am afraid someday I find a whole different project and my changes do not fit anymore and I can rewrite this (small) change. I don't have so much time so I am not sure to be able to keep up with the projects speed. |
Hi @topas-rec |
I did not rebase but I merged your development branch into this branch just now. |
@MiczFlor everything is up to date - please merge. |
is there a way to simply implement this in stable? (am i supposed to post here?) |
It has to be merged by a maintainer. You can copy the file gpio-buttons.py from develop to your box manually until it is merged. |
i tried my working develop gpio-buttons.py file on my stable version but LED does still not work on stable. |
Led connected as described here? |
yes. and it's working on my "develop-sdcard" |
So just not working when copying the develop file gpio-buttons.py into the stable (master) branch? I don't have an idea why. For me this file was always like an atomic thing. Works when present. Can you put a debug printf in that file to see what that code does and why the led doesn't light up? You can see these printf by looking in the /var/log/syslog file. |
exactly
huh. if you tell me where to put what i shure could. |
General printing of messages in python: |
@MiczFlor let us know if this should better be discussed in an issue rather than in a merged PR. |
i'm afraid this is (far) above my "potential". thanks for your effort however! edit: oh my, this is truly way above me... with just changing the gpio-buttons.py none of the buttons work anymore as before. (yes - with correct gpios) |
We're working on releasing 2.0 "soon" although I can't give you a date. Please see #890 for coordination of the release. |
In my opinion a good addition to find out if usb power connection can be safely disconnected between Raspberry Pi and the Power bank using an external switch.
Led is turned on, when Pi is running, when pushing power button is blinks two times to indicate shutdown initiated. Then is stays on until Pi loses power. Now one can disconnect power safely.
Led uses free GPIO 3.
Can be ignored if led is not used.
Renamed GPIO buttons file because it now also controls led.
I made video of the functionality, but need to upload it somewhere.