diff --git a/Adafruit_pIRKey/NEC_keyboard_example.py b/Adafruit_pIRKey/NEC_keyboard_example.py index 03a2cfe7b..799b4831a 100644 --- a/Adafruit_pIRKey/NEC_keyboard_example.py +++ b/Adafruit_pIRKey/NEC_keyboard_example.py @@ -2,6 +2,7 @@ # When used with the Adafruit NEC remote will act like a keyboard and # type out keypresses. +import time import adafruit_irremote from adafruit_hid.keyboard import Keyboard from adafruit_hid.keycode import Keycode @@ -9,7 +10,6 @@ from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS import adafruit_dotstar import pulseio import board -import time led = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1) @@ -73,4 +73,3 @@ while True: led[0] = (100, 0, 0) # flash red print("Failed to decode: ", e.args) print("----------------------------") - diff --git a/Adafruit_pIRKey/NEC_print_example.py b/Adafruit_pIRKey/NEC_print_example.py index b419ab220..f12010266 100644 --- a/Adafruit_pIRKey/NEC_print_example.py +++ b/Adafruit_pIRKey/NEC_print_example.py @@ -31,4 +31,3 @@ while True: print("Failed to decode: ", e.args) print("----------------------------") - diff --git a/Adafruit_pIRKey/main.py b/Adafruit_pIRKey/main.py index 0f2103751..2e7bcbd13 100644 --- a/Adafruit_pIRKey/main.py +++ b/Adafruit_pIRKey/main.py @@ -3,7 +3,6 @@ import pulseio import board -import time import adafruit_dotstar import adafruit_irremote diff --git a/Adafruit_pIRKey/raw_code_keyboard/main.py b/Adafruit_pIRKey/raw_code_keyboard/main.py index e689393ff..b47e68be9 100644 --- a/Adafruit_pIRKey/raw_code_keyboard/main.py +++ b/Adafruit_pIRKey/raw_code_keyboard/main.py @@ -18,7 +18,7 @@ decoder = adafruit_irremote.GenericDecode() pulsein = pulseio.PulseIn(board.REMOTEIN, maxlen=100, idle_state=True) # Expected pulse, pasted in from previous recording REPL session: -key1_pulses = [0 +key1_pulses = [0] key2_pulses = [1] diff --git a/Animatronic_Hand/binary_counting.py b/Animatronic_Hand/binary_counting.py index e628bb864..71808300f 100644 --- a/Animatronic_Hand/binary_counting.py +++ b/Animatronic_Hand/binary_counting.py @@ -1,5 +1,6 @@ # Animatronic Hand # Binary Counting on four fingers up to 15 +import time from digitalio import DigitalInOut, Direction, Pull import audioio from adafruit_seesaw.seesaw import Seesaw @@ -7,7 +8,6 @@ from adafruit_seesaw.pwmout import PWMOut from adafruit_motor import servo from busio import I2C import board -import time # Create I2C and seesaw objuect i2c = I2C(board.SCL, board.SDA) diff --git a/CircuitPy_OTP/main.py b/CircuitPy_OTP/main.py index f3c602831..acecfe631 100644 --- a/CircuitPy_OTP/main.py +++ b/CircuitPy_OTP/main.py @@ -8,6 +8,8 @@ import ntptime import ubinascii import uhashlib +# pylint: disable=broad-except + # https://github.com/pyotp/pyotp example totp = [("Discord ", 'JBSWY3DPEHPK3PXP'), ("Gmail ", 'abcdefghijklmnopqrstuvwxyz234567'), diff --git a/CircuitPython_TVBGone/cpx_main.py b/CircuitPython_TVBGone/cpx_main.py index 144965eb8..9f6ca3b5c 100644 --- a/CircuitPython_TVBGone/cpx_main.py +++ b/CircuitPython_TVBGone/cpx_main.py @@ -4,7 +4,7 @@ import time import board import pulseio from digitalio import DigitalInOut, Direction, Pull - +# pylint: disable=eval-used # Switch to select 'stealth-mode' switch = DigitalInOut(board.SLIDE_SWITCH) switch.direction = Direction.INPUT diff --git a/CircuitPython_TVBGone/gemma_main.py b/CircuitPython_TVBGone/gemma_main.py index 690d5f558..aa03ce81d 100644 --- a/CircuitPython_TVBGone/gemma_main.py +++ b/CircuitPython_TVBGone/gemma_main.py @@ -7,6 +7,8 @@ import board import pulseio from digitalio import DigitalInOut, Direction +# pylint: disable=eval-used + pixel = adafruit_dotstar.DotStar( board.APA102_SCK, board.APA102_MOSI, 1, brightness=0.2) pixel.fill((0, 0, 0)) diff --git a/Crickit_Stumblebot/code.py b/Crickit_Stumblebot/code.py index b0144f488..12c2d9d0c 100644 --- a/Crickit_Stumblebot/code.py +++ b/Crickit_Stumblebot/code.py @@ -1,4 +1,4 @@ -# Stumble Bot, coded in CircuitPython +# Stumble Bot, coded in CircuitPython # Using an Adafruit Circuit Playground Express, Crickit, and 2 servos # Dano Wall, Mike Barela for Adafruit Industries, MIT License, May, 2018 # @@ -42,10 +42,10 @@ def servo_front(direction): index = 90 while index >= 50: servos[1].angle = index - time.sleep(0.040) + time.sleep(0.040) index = index - 1 - time.sleep(0.002) - + time.sleep(0.002) + def servo_back(direction): if direction > 0: index = 65 @@ -57,15 +57,15 @@ def servo_back(direction): index = 95 while index >= 65: servos[0].angle = index - time.sleep(0.040) + time.sleep(0.040) index = index - 3 - time.sleep(0.020) - + time.sleep(0.020) + print("Its Stumble Bot Time") while True: - if button_A.value: # If button A is pressed, start bot - led.value = True # Turn on LED 13 to show we're gone! + if button_A.value: # If button A is pressed, start bot + led.value = True # Turn on LED 13 to show we're gone! for i in range(5): print("back 1") servo_back(1)