diff --git a/Gemma_Firewalker_Lite_Sneakers/Gemma_Firewalker_Lite_Sneakers.py b/Gemma_Firewalker_Lite_Sneakers/Gemma_Firewalker_Lite_Sneakers.py index c1e14be7..3af06fdf 100644 --- a/Gemma_Firewalker_Lite_Sneakers/Gemma_Firewalker_Lite_Sneakers.py +++ b/Gemma_Firewalker_Lite_Sneakers/Gemma_Firewalker_Lite_Sneakers.py @@ -100,6 +100,7 @@ def h2rgb(colour_hue): return ret * 17 +# pylint: disable=global-statement def wave_setup(): global wave diff --git a/ROB_Control/code.py b/ROB_Control/code.py index c24a50ee..5fd20d46 100644 --- a/ROB_Control/code.py +++ b/ROB_Control/code.py @@ -1,14 +1,14 @@ -# Nintendo R.O.B. control with Accelerometer, code in CircuitPython +# Nintendo R.O.B. control with Accelerometer, code in CircuitPython # Using an Adafruit Circuit Playground Express board with an IR LED # Mike Barela for Adafruit Industries, MIT License, May, 2018 # Acknowledgement to info at http://atariage.com/forums/topic/177286 # -any-interest-in-nes-rob-homebrews/ and Limor Ladyada Fried +import time +import gc from digitalio import DigitalInOut, Direction from adafruit_circuitplayground.express import cpx import board -import time -import gc # Commands, each 8 bit command is preceded by the 5 bit Init sequence Init = [0, 0, 0, 1, 0] # This must precede any command @@ -37,11 +37,11 @@ def IR_Command(cmd): for val in Init+cmd: # For each value in initial+command if val: # if it's a one, flash the IR LED IRled.value = True # Turn IR LED turn on for 1.5 ms - time.sleep(0.0015) # 1.5 ms on + time.sleep(0.0015) # 1.5 ms on IRled.value = False # Turn IR LED off for 15 ms time.sleep(0.0150) # 15 ms else: - time.sleep(0.0167) # 1 cycle turn off + time.sleep(0.0167) # 1 cycle turn off while True: # Main Loop poll switches, do commands x, y, z = cpx.acceleration # Read accelerometer diff --git a/Starry_Night/starry_night.py b/Starry_Night/starry_night.py index 1f13dc51..bf69cdb2 100644 --- a/Starry_Night/starry_night.py +++ b/Starry_Night/starry_night.py @@ -1,9 +1,9 @@ +import time from busio import I2C from adafruit_seesaw.seesaw import Seesaw from adafruit_seesaw.pwmout import PWMOut from adafruit_motor import motor import board -import time # Create seesaw object i2c = I2C(board.SCL, board.SDA) @@ -24,5 +24,5 @@ while True: my_drive.duty_cycle = 16384 # dim time.sleep(0.1) - + # and repeat! diff --git a/Trash_Panda/code.py b/Trash_Panda/code.py index 7fe93563..8239f117 100644 --- a/Trash_Panda/code.py +++ b/Trash_Panda/code.py @@ -1,12 +1,13 @@ -# Code for the Trash Panda tutorial with Adafruit Crickit and Circuit Playground Express 5/2018 Dano Wall +# Code for the Trash Panda tutorial with Adafruit Crickit and Circuit Playground Express +# 5/2018 Dano Wall -from digitalio import DigitalInOut, Direction, Pull +import time +from digitalio import DigitalInOut, Direction from adafruit_seesaw.seesaw import Seesaw from adafruit_seesaw.pwmout import PWMOut from adafruit_motor import servo from busio import I2C import board -import time # Create seesaw object i2c = I2C(board.SCL, board.SDA) @@ -23,7 +24,7 @@ for ss_pin in (17, 16, 15, 14): _servo = servo.Servo(pwm, min_pulse=600, max_pulse=2500) _servo.angle = 90 # starting angle, middle servos.append(_servo) - + print("Its TRASH PANDA TIME!") while True: