Beispiel #1
0
#!/usr/bin/python
from eye import get_eye_data
import time
import scrollphathd
IMAGE_BRIGHTNESS = .6

LOOK_DOWN = get_eye_data("down")
LOOK_DOWN_REVERSE = LOOK_DOWN[::-1]


def look_down():
    for data in LOOK_DOWN:
        for x in range(0, scrollphathd.DISPLAY_WIDTH):
            for y in range(0, scrollphathd.DISPLAY_HEIGHT):
                brightness = data[x][y]
                scrollphathd.pixel(x, y, brightness * IMAGE_BRIGHTNESS)
        scrollphathd.show()
        time.sleep(0.01)
    time.sleep(2)
    for data in LOOK_DOWN_REVERSE:
        for x in range(0, scrollphathd.DISPLAY_WIDTH):
            for y in range(0, scrollphathd.DISPLAY_HEIGHT):
                brightness = data[x][y]
                scrollphathd.pixel(x, y, brightness * IMAGE_BRIGHTNESS)
        scrollphathd.show()
        time.sleep(0.01)
Beispiel #2
0
#!/usr/bin/python
from eye import get_eye_data
import time
import scrollphathd
IMAGE_BRIGHTNESS = .6

LOOK_RIGHT = get_eye_data("right")
LOOK_RIGHT_REVERSE = LOOK_RIGHT[::-1]


def look_right():
    for data in LOOK_RIGHT:
        for x in range(0, scrollphathd.DISPLAY_WIDTH):
            for y in range(0, scrollphathd.DISPLAY_HEIGHT):
                brightness = data[x][y]
                scrollphathd.pixel(x, y, brightness * IMAGE_BRIGHTNESS)
        scrollphathd.show()
        time.sleep(0.01)
    time.sleep(2)
    for data in LOOK_RIGHT_REVERSE:
        for x in range(0, scrollphathd.DISPLAY_WIDTH):
            for y in range(0, scrollphathd.DISPLAY_HEIGHT):
                brightness = data[x][y]
                scrollphathd.pixel(x, y, brightness * IMAGE_BRIGHTNESS)
        scrollphathd.show()
        time.sleep(0.01)
Beispiel #3
0
#!/usr/bin/python
from eye import get_eye_data
import time
import scrollphathd
IMAGE_BRIGHTNESS = .6

LOOK_UP = get_eye_data("up")
LOOK_UP_REVERSE = LOOK_UP[::-1]
def look_up():
  for data in LOOK_UP:
    for x in range(0, scrollphathd.DISPLAY_WIDTH):
      for y in range(0, scrollphathd.DISPLAY_HEIGHT):
          brightness = data[x][y]
          scrollphathd.pixel(x, y, brightness * IMAGE_BRIGHTNESS)
    scrollphathd.show()
    time.sleep(0.01)
  time.sleep(2)
  for data in LOOK_UP_REVERSE:
    for x in range(0, scrollphathd.DISPLAY_WIDTH):
      for y in range(0, scrollphathd.DISPLAY_HEIGHT):
          brightness = data[x][y]
          scrollphathd.pixel(x, y, brightness * IMAGE_BRIGHTNESS)
    scrollphathd.show()
    time.sleep(0.01)
Beispiel #4
0
#!/usr/bin/python
from eye import get_eye_data
import time
import scrollphathd
IMAGE_BRIGHTNESS = .6

BLINK = get_eye_data("blink")
BLINK_REVERSE = BLINK[::-1]


def blink():
    for data in BLINK:
        for x in range(0, scrollphathd.DISPLAY_WIDTH):
            for y in range(0, scrollphathd.DISPLAY_HEIGHT):
                brightness = data[x][y]
                scrollphathd.pixel(x, y, brightness * IMAGE_BRIGHTNESS)
        scrollphathd.show()
        time.sleep(0.001)
    time.sleep(.002)
    for data in BLINK_REVERSE:
        for x in range(0, scrollphathd.DISPLAY_WIDTH):
            for y in range(0, scrollphathd.DISPLAY_HEIGHT):
                brightness = data[x][y]
                scrollphathd.pixel(x, y, brightness * IMAGE_BRIGHTNESS)
        scrollphathd.show()
        time.sleep(0.005)
Beispiel #5
0
#!/usr/bin/python
from eye import get_eye_data
import time
import scrollphathd
IMAGE_BRIGHTNESS = .6

ROLL = get_eye_data("roll")
ROLL_REVERSE = ROLL[::-1]


def roll():
    for data in ROLL:
        for x in range(0, scrollphathd.DISPLAY_WIDTH):
            for y in range(0, scrollphathd.DISPLAY_HEIGHT):
                brightness = data[x][y]
                scrollphathd.pixel(x, y, brightness * IMAGE_BRIGHTNESS)
        scrollphathd.show()
        time.sleep(0.01)
Beispiel #6
0
#!/usr/bin/python
from eye import get_eye_data
import time
import scrollphathd
IMAGE_BRIGHTNESS = .6

LOOK_LEFT = get_eye_data("left")
LOOK_LEFT_REVERSE = LOOK_LEFT[::-1]
def look_left():
  for data in LOOK_LEFT:
    for x in range(0, scrollphathd.DISPLAY_WIDTH):
      for y in range(0, scrollphathd.DISPLAY_HEIGHT):
          brightness = data[x][y]
          scrollphathd.pixel(x, y, brightness * IMAGE_BRIGHTNESS)
    scrollphathd.show()
    time.sleep(0.01)
  time.sleep(2)
  for data in LOOK_LEFT_REVERSE:
    for x in range(0, scrollphathd.DISPLAY_WIDTH):
      for y in range(0, scrollphathd.DISPLAY_HEIGHT):
          brightness = data[x][y]
          scrollphathd.pixel(x, y, brightness * IMAGE_BRIGHTNESS)
    scrollphathd.show()
    time.sleep(0.01)