Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15
  1. #11
    Quote Originally Posted by paul- View Post
    You can run any program you want. The user commands section near the bottom of the tweaks page is the easiest.
    Hello all,

    I am still needing your need on this topic.
    I have put a Led between the GPIO 17 and The ground (with a resistance in between) and, check when the led turns on / off. Initially I have set the tweak on with Active High
    I have to tell I was expecting the led to be turned on when the Player is on. When I say "the player", i don't mean the RPI, i mean the state of the piCore Player that is on when you are listening to music, and Off when you press the Power button in the LMS... Using also the WakeUp function.. that turns on the player.. that will turn on the HiFi system.

    Anyway.. this function won't turn on the led. I have changed the tweak to Active Low, the Led Stays On and never turn Off.

    The my question, Is it something I am doing wrong ? Or did I have misunderstood the functionality of the GPIO-PowerOff ?

    Thanl you Folks

    yves

  2. #12
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,622
    Use manual controls to make sure things are setup properly. There is a command line utility to do this. Also make sure you are not confusing BCM numbering vs physical pin. i.e. GPIO 17 is Physical pin 11. Then also make sure nothing is using GPIO 17. (DAC Hats use GPIO pins for control)

    To see the state of everything
    Code:
    tc@Pi4-armhf-Devel:~$ sudo readall.sh
    +-----+---------+------+---+-----++-----+---+------+---------+-----+
    | BCM |  NAME   | MODE | V |  Physical  | V | MODE |  NAME   | BCM |
    +-----+---------+------+---+-----++-----+---+------+---------+-----+
    |     |    3.3v |      |   |   1 ||  2  |   |      |      5v |     |
    |  2  | GPIO  2 | ALT0 | 1 |   3 ||  4  |   |      |      5v |     |
    |  3  | GPIO  3 | ALT0 | 1 |   5 ||  6  |   |      |      0v |     |
    |  4  | GPIO  4 |   IN | 1 |   7 ||   8 | 1 |   IN | GPIO 14 |  14 |
    |     |      0v |      |   |   9 ||  10 | 1 |   IN | GPIO 15 |  15 |
    | 17  | GPIO 17 |   IN | 0 |  11 ||  12 | 0 | ALT0 | GPIO 18 |  18 |
    | 27  | GPIO 27 |   IN | 0 |  13 ||  14 |   |      |      0v |     |
    | 22  | GPIO 22 |   IN | 0 |  15 ||  16 | 0 |   IN | GPIO 23 |  23 |
    |     |    3.3v |      |   |  17 ||  18 | 0 |   IN | GPIO 24 |  24 |
    | 10  | GPIO 10 | ALT0 | 0 |  19 ||  20 |   |      |      0v |     |
    |  9  | GPIO  9 | ALT0 | 0 |  21 ||  22 | 0 |   IN | GPIO 25 |  25 |
    | 11  | GPIO 11 | ALT0 | 0 |  23 ||  24 | 1 |  OUT | GPIO  8 |   8 |
    |     |      0v |      |   |  25 ||  26 | 1 |  OUT | GPIO  7 |   7 |
    |  0  | GPIO  0 |   IN | 1 |  27 ||  28 | 1 |   IN | GPIO  1 |   1 |
    |  5  | GPIO  5 |   IN | 1 |  29 ||  30 |   |      |      0v |     |
    |  6  | GPIO  6 |   IN | 1 |  31 ||  32 | 0 |   IN | GPIO 12 |  12 |
    | 13  | GPIO 13 |   IN | 0 |  33 ||  34 |   |      |      0v |     |
    | 19  | GPIO 19 | ALT0 | 0 |  35 ||  36 | 0 |   IN | GPIO 16 |  16 |
    | 26  | GPIO 26 |   IN | 0 |  37 ||  38 | 0 | ALT0 | GPIO 20 |  20 |
    |     |      0v |      |   |  39 ||  40 | 0 | ALT0 | GPIO 21 |  21 |
    +-----+---------+------+---+-----++-----+---+------+---------+-----+
    | BCM |  NAME   | MODE | V |  Physical  | V | MODE |  NAME   | BCM |
    +-----+---------+------+---+-----++-----+---+------+---------+-----+
    Set GPIO 17 as an output
    Code:
    tc@Pi4-armhf-Devel:~$ sudo pcp-gpio mode 17 out
    Toggle GPIO 17 or set GPIO 17 to a value
    Code:
    tc@Pi4-armhf-Devel:~$ sudo pcp-gpio toggle 17
    tc@Pi4-armhf-Devel:~$ sudo pcp-gpio write 17 1    <----On
    tc@Pi4-armhf-Devel:~$ sudo pcp-gpio write 17 0    <----Off
    If this still doesn't work, then you may have damaged your pi.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  3. #13
    Thank you Paul for this tool that I didn't know.

    But After testing my GPIO 17 is working properly

    I want to retype that when, in the tweak, the GPIO 17 used for GPIO-POWEROFF never light on the led when active-high
    When I changed it to Active-Low.. it stays on and never turns off.

    Here is the test :

    Name:  piCore1.jpg
Views: 71
Size:  66.3 KB
    Name:  piCore2.jpg
Views: 70
Size:  30.9 KB
    Name:  piCore3.jpg
Views: 69
Size:  75.1 KB
    Name:  piCore4.jpg
Views: 70
Size:  171.5 KB

    Then It is supposed to turn the led on/off when the player is on/standby ?

    thx for your help

  4. #14
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,622
    You are not in the right spot. If you see the little red more> links on all of the pages, if you click on them, it expands to show a little more information/help about the setting. The gpio-poweroff and gpio-shutdown are system level events. It has absolutely nothing to do with LMS/Squeezelite. Turn those options back off, then reboot.

    Then on the squeezelite settings page, Put a 17 in the box and select active high.

    Name:  2021-11-24_14-16.png
Views: 68
Size:  7.5 KB
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  5. #15
    Quote Originally Posted by paul- View Post
    Then on the squeezelite settings page, Put a 17 in the box and select active high.

    Name:  2021-11-24_14-16.png
Views: 68
Size:  7.5 KB

    Great,

    I hoped that showing the picture will help Now the led is turning On /off Properly

    I keep on doing my project.. and certainly will come later withe the TouchScreen issues

    thx paul.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •