Fix PEP8 compliance
This commit is contained in:
parent
c9ad539ab9
commit
c8a61175a2
4 changed files with 6 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ while True:
|
|||
data = uart.read(32) # read up to 32 bytes
|
||||
# print(data) # this is a bytearray type
|
||||
|
||||
if data != None:
|
||||
if data is not None:
|
||||
led.value = True
|
||||
|
||||
# convert bytearray to string
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import board
|
|||
import neopixel
|
||||
|
||||
numpix = 22 # Number of NeoPixels
|
||||
pixpin = board.D1 # Pin where NeoPixels are connected Gemma M0 = D1 | Trinket M0 = D4
|
||||
pixpin = board.D1 # NeoPixels pin. For Gemma M0 = D1, Trinket M0 = D4
|
||||
strip = neopixel.NeoPixel(pixpin, numpix, brightness=1, auto_write=False)
|
||||
pos = 0 # position
|
||||
direction = 1 # direction of "eye"
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ except ImportError:
|
|||
import random
|
||||
|
||||
neo_pin = board.D0 # DIGITAL IO pin for NeoPixel OUTPUT from GEMMA
|
||||
touch_pin = board.D2 # DIGITAL IO pin for momentary touch sensor INPUT to GEMMA
|
||||
touch_pin = board.D2 # DIGITAL IO pin for momentary touch sensor to GEMMA
|
||||
pixel_count = 30 # Number of NeoPixels connected to GEMMA
|
||||
delay_sec = .010 # delay between blinks, smaller numbers are faster
|
||||
delay_mult = 8 # Randomization multiplier, delay speed of the effect
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@ while True:
|
|||
|
||||
frame = struct.unpack(">HHHHHHHHHHHHHH", bytes(buffer[4:]))
|
||||
|
||||
pm10_standard, pm25_standard, pm100_standard, pm10_env, pm25_env, pm100_env, particles_03um, particles_05um, particles_10um, particles_25um, particles_50um, particles_100um, skip, checksum = frame
|
||||
pm10_standard, pm25_standard, pm100_standard, pm10_env, \
|
||||
pm25_env, pm100_env, particles_03um, particles_05um, particles_10um, \
|
||||
particles_25um, particles_50um, particles_100um, skip, checksum = frame
|
||||
|
||||
check = sum(buffer[0:30])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue