Ejemplo n.º 1
0
##
##  PyGlow
##
##      python module to control Pimoronis PiGlow (http://shop.pimoroni.com/products/piglow)
##
##      * pulsetest.py - test the pulsing light feature
##

from pyglow import PyGlow

pyglow = PyGlow()

val = input("Maximum Brightness: ")
speedval = input("Speed (Try 500 as a default): ")
pyglow.all(0)
print("Pulsing 1 Light")
pyglow.pulse(1, val, speedval)
print("Pulsing Arms")
pyglow.pulse_arm(1, val, speedval)
pyglow.pulse_arm(2, val, speedval)
pyglow.pulse_arm(3, val, speedval)
print("Pulsing All")
pyglow.pulse_all(val, speedval)
Ejemplo n.º 2
0
pyglow = PyGlow()

val = input("How bright? (0-225): ")

if val < 0 or val > 255:
	print("Sorry, try again")
	sys.exit()

speedval = input("How fast? (500 recommended): ")


pyglow.all(0)

print("Check out my bright idea.")
pyglow.pulse(1, val, speedval)
pyglow.pulse(2, val, speedval)
pyglow.pulse(3, val, speedval)
pyglow.pulse(4, val, speedval)
pyglow.pulse(5, val, speedval)
pyglow.pulse(6, val, speedval)
pyglow.pulse(7, val, speedval)
pyglow.pulse(8, val, speedval)
pyglow.pulse(9, val, speedval)
pyglow.pulse(10, val, speedval)
pyglow.pulse(11, val, speedval)
pyglow.pulse(12, val, speedval)
pyglow.pulse(13, val, speedval)
pyglow.pulse(14, val, speedval)
pyglow.pulse(15, val, speedval)
pyglow.pulse(16, val, speedval)
Ejemplo n.º 3
0
##
##  PyGlow
##
##      python module to control Pimoronis PiGlow (http://shop.pimoroni.com/products/piglow)
##
##      * pulsetest.py - test the pulsing light feature
##

from pyglow import PyGlow

pyglow = PyGlow()

val = input("Maximum Brightness: ")
speedval = input("Speed (Try 500 as a default): ")
pyglow.all(0)
print("Pulsing 1 Light")
pyglow.pulse(1, val, speedval)
print("Pulsing Arms")
pyglow.pulse_arm(1, val, speedval)
pyglow.pulse_arm(2, val, speedval)
pyglow.pulse_arm(3, val, speedval)
print("Pulsing All")
pyglow.pulse_all(val, speedval)