Python show Examples

Python show - 3 examples found. These are the top rated real world Python examples of extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
def playnap(offset = 0, mediapath = "/home/pi/"):
	#blink all the indicators
    i = 0
    while i <= 5:
      i += 1
Example #2
def wave(led_max=150, frame_delay=0.02, frame_count=None, initial_brightness=None, direction=None):
    Creates a wave effect through the PiGlow board.

    Args (all are optional):
        led_max (int): the LED brightness at the peak of the wave.
        frame_delay (float): the time between each transition.
        frame_count (int): the number of transitions in a single wave.
        initial_brightness (int): the current brightness of the LEDs.
        direction (string): either 'inward' or 'outward'.
    if initial_brightness is None:
        initial_brightness = min(piglow.get())

    if direction is None:
        direction = "outward"

    if frame_count is None:
        frame_count = len(LEDS)

    if direction == "outward":

    led_set_count = len(LEDS)

    # initialise all of the LEDs

    wave = _create_led_sine_wave(led_max, frame_count, initial_brightness, led_set_count)

    for wave_point in _window(wave, led_set_count):
        for i, led_set in enumerate(LEDS):
            for led in led_set:
                piglow.led(led, int(wave_point[i]))

Example #3
#!/usr/bin/env python

import time

import piglow

i = 0
x = 0

while True:
    if i % 32 == 0:
        piglow.leg((x % 3), 64)
        x += 1
    piglow.set(0, list(map(lambda x: x - 1 if x > 1 else 0, piglow.get())))
    i += 1