This commit is contained in:
Kattni Rembor 2018-05-29 15:26:32 -04:00
parent 4c43ce978e
commit 74d22d2d64
5 changed files with 43 additions and 44 deletions

View file

@ -1,10 +1,10 @@
from digitalio import DigitalInOut, Direction, Pull import time
from digitalio import DigitalInOut, Direction
from adafruit_seesaw.seesaw import Seesaw from adafruit_seesaw.seesaw import Seesaw
from adafruit_seesaw.pwmout import PWMOut from adafruit_seesaw.pwmout import PWMOut
from adafruit_motor import servo from adafruit_motor import servo
from busio import I2C from busio import I2C
import board import board
import time
# Create seesaw object # Create seesaw object

View file

@ -1,4 +1,5 @@
# CircuitPython 3.0 CRICKIT demo # CircuitPython 3.0 CRICKIT demo
import time
from adafruit_seesaw.seesaw import Seesaw from adafruit_seesaw.seesaw import Seesaw
from adafruit_seesaw.pwmout import PWMOut from adafruit_seesaw.pwmout import PWMOut
from adafruit_motor import servo from adafruit_motor import servo
@ -6,7 +7,6 @@ from busio import I2C
import audioio import audioio
import microcontroller import microcontroller
import board import board
import time
i2c = I2C(board.SCL, board.SDA) i2c = I2C(board.SCL, board.SDA)
ss = Seesaw(i2c) ss = Seesaw(i2c)

View file

@ -1,3 +1,4 @@
import time
import gc import gc
import pulseio import pulseio
gc.collect() gc.collect()
@ -15,7 +16,6 @@ import audioio
gc.collect() gc.collect()
from busio import I2C from busio import I2C
import board import board
import time
print("Blimp!") print("Blimp!")

View file

@ -122,12 +122,11 @@ beat_phase = beat_period / 5.0 # Phase controls how long in-between
# transforming a value in one range to a value in another (like Arduino's map # transforming a value in one range to a value in another (like Arduino's map
# function). # function).
# pylint: disable=redefined-outer-name
def lerp(x, x0, x1, y0, y1): def lerp(x, x0, x1, y0, y1):
return y0 + (x - x0) * ((y1 - y0) / (x1 - x0)) return y0 + (x - x0) * ((y1 - y0) / (x1 - x0))
# pylint: disable=redefined-outer-name
# Main loop below will run forever: # Main loop below will run forever:
while True: while True:
# Get the current time at the start of the animation update. # Get the current time at the start of the animation update.

View file

@ -120,7 +120,7 @@ def display_emulating_screen():
oled.show() oled.show()
#pylint disable=global-statement # pylint disable=global-statement
def emulate(): def emulate():
global current_mode global current_mode
data = load_file(current_dir.selected_filepath) data = load_file(current_dir.selected_filepath)