Jul-24-2018, 08:23 PM
hello i want use
python3 rgb.py colore modalita
but sys.argv[1] and sys.argv[2] not work.
my code
after this i want
and
example
but i can't find correct sintax
python3 rgb.py colore modalita
but sys.argv[1] and sys.argv[2] not work.
my code
1 2 3 4 5 6 7 8 9 |
import os, sys from gpiozero import RGBLED print ( "Modalita:" , sys.argv[ 2 ]) print ( "Colore:" , sys.argv[ 1 ]) # Pin R = 11 G = 13 B = 15 rgb = RGBLED(R,G,B, False ) |
1 |
rgb.color = (sys,argv[ 2 ]) |
1 |
rgb.sys.argv[ 1 ]() |
1 2 |
rgb.color = ( 1 , 0 , 1 ) rgb.on() |
