-
Notifications
You must be signed in to change notification settings - Fork 397
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
Update Detect rfidoff function in gpio-buttons.py #869
Conversation
Adapted the RFID-Off function to the new gpio-buttons code structure. Works fine with the hardware hack for the USB-rfid reader described here: MiczFlor#62 The rfidoff event is triggered when the used gpio is pulled down.
@@ -127,9 +128,9 @@ GPIO.setup(btn_volD , GPIO.IN, pull_up_down=GPIO.PUD_UP) | |||
GPIO.setup(btn_next , GPIO.IN, pull_up_down=GPIO.PUD_UP) | |||
GPIO.setup(btn_prev , GPIO.IN, pull_up_down=GPIO.PUD_UP) | |||
GPIO.setup(btn_halt , GPIO.IN, pull_up_down=GPIO.PUD_UP) | |||
#GPIO.setup(btn_rfidoff, GPIO.IN, pull_up_down=GPIO.PUD_UP) | |||
#GPIO.setup(btn_rfidoff , GPIO.IN, pull_up_down=GPIO.PUD_DOWN) |
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.
Not sure, why it’s changed from up to down?
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.
Cause the action should First be triggered after the gpio is pulled down or RFID chip ist removed.
can't get it to work - which pinout numbering must be used? mine is plugged in Physical pin 26 |
So I fixed the problem with the reboot and turned off gpis, and for the removal- wh.. I just changed the action to "halt.action" instead of "rfidoff_action" and now it at least stops... but why the rfidoff action is not working still needs to be figured out... |
You have to use the Pin number from BCM. So this is right. |
For debugging your gpio-buttons.py script you could try to start it over the terminal/ssh by |
I used the hardewarehack- and it did work before the new python version - and the „triggering“ seems to work as well - but the rfidoff_action seems to be the problem in my case - like mentioned before as soon as I change it (with identical pin numbering) to halt_action it does halt uppon removal. |
@MalteHST Could you check, if there's a up-to-date description in the wiki? |
No there is not. I didn´t found any description about the hardware hack and gpio-buttons.py adaption for this function. |
Added a description to the wiki: Assigned it to the chapter Hacks. Please have a look if this is understandable enough. |
I have the exact same problem! |
Of course you are right. Thanks. I' ve added "channel" to the Code. I think there ist no need for an additional pull request. |
Hi MalteHST, i have an offtopic question. |
Sry but I´m not that familiar with forking and so on at github. But you could just copy the code after the installation of the develop branch. |
* save used git commit hash to version file (see #828) * added first idea * Get rid of debconf: falling back to frontend: Readline messages while installing * Adapt for stretch dockerfile * Added functions for logging * Enable Logging during the installation * Added config file information into logging * Updated comments * fixed flake8 warnings * read current commit from Github * Consolidate install scripts (#871) * Remove duplicate chown/chmod * Align stretch install scripts * Remove stretch-install-spotify.sh script * Add info about pkg installation (#879) * Add info about pkg installation Fix for #818 * Update README.md * added missing sudo * Update Detect rfidoff function in gpio-buttons.py (#869) * Update Detect rfidoff function in gpio-buttons.py Adapted the RFID-Off function to the new gpio-buttons code structure. Works fine with the hardware hack for the USB-rfid reader described here: #62 The rfidoff event is triggered when the used gpio is pulled down. * Added Missing "Channel" to rfidoff Action * add empty header context to spotify requests, fixes title and cover download (#884) Co-authored-by: fhaertig <felix.haertig@ecube.de> * Add info how to post logging info (#882) * fixed flake8 warnings Co-authored-by: Kiri <kiri@sockiri01.bbn.verigy.net> Co-authored-by: Groovylein <kiriakos.antoniadis.kiri@gmail.com> Co-authored-by: Micz Flor <micz.flor@web.de> Co-authored-by: Fred G <fredg02@hotmail.com> Co-authored-by: MalteHST <40899451+MalteHST@users.noreply.github.com> Co-authored-by: lovethisshit <2253904+lovethisshit@users.noreply.github.com> Co-authored-by: fhaertig <felix.haertig@ecube.de>
Adapted the RFID-Off function to the new gpio-buttons code structure. Works fine with the hardware hack for the USB-rfid reader described here:
#62
The rfidoff event is triggered when the used gpio is pulled down.