Hello,
i make 3 script
volplus10.sh
>
> #!/bin/bash
> echo "b8:27:eb:53:6f:47 mixer volume +10" | nc -i 1 127.0.0.1 9090
>
volmoins10.sh
>
> #!/bin/bash
> echo "b8:27:eb:53:6f:47 mixer volume -10" | nc -i 1 127.0.0.1 9090
>
and mute.sh
>
> #!/bin/bash
> echo "b8:27:eb:53:6f:47 mixer volume -100" | nc -i 1 127.0.0.1 9090
>
after, script to read my 3 button:
boutons.sh
> #!/usr/bin/env python
> from time import sleep
> import os
> import RPi.GPIO as GPIO
> GPIO.setmode(GPIO.BCM)
> GPIO.setup(17, GPIO.IN)
> GPIO.setup(22, GPIO.IN)
> GPIO.setup(23, GPIO.IN)
>
> while True:
> if ( GPIO.input(17) == False ):
> os.system('bash /home/pi/script/volplus10.sh')
> inputval = GPIO.input(17)
> sleep(0.1);
> if ( GPIO.input(22) == False ):
> os.system('bash /home/pi/script/volmoins10.sh')
> inputval = GPIO.input(22)
> sleep(0.1);
> if ( GPIO.input(23) == False ):
> os.system('bash /home/pi/script/mute.sh')
> inputval = GPIO.input(23)
> sleep(0.1);
> sleep(0.1);
now i need start automaticly this script on boot AND TRY :D
i don't have now button and no have idea for resistors, I continue my
research
------------------------------------------------------------------------
TheD6Bel's Profile: http://forums.slimdevices.com/member.php?userid=58077
View this thread: http://forums.slimdevices.com/showthread.php?t=101096
_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/discuss