Merge branch 'main' of https://git.nugget.fun/scrape/scrapeboard
This commit is contained in:
commit
66d9eabfe5
10
NS.py
10
NS.py
|
@ -11,6 +11,13 @@
|
|||
# This is the main file containing all the pygame code.
|
||||
|
||||
import argparse, pathlib, operator, subprocess, sys, os
|
||||
|
||||
# Auto-detect GPIO library
|
||||
try:
|
||||
import gpio
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
from random import randint, choice, random
|
||||
from math import pi
|
||||
from copy import copy
|
||||
|
@ -239,8 +246,6 @@ class NS(Game, Animation):
|
|||
# init Pi
|
||||
if self.pi_enabled():
|
||||
|
||||
import gpio
|
||||
|
||||
# Initialize GPIO interface
|
||||
gpio.initialize_gpio()
|
||||
|
||||
|
@ -249,6 +254,7 @@ class NS(Game, Animation):
|
|||
self.gpio_kill = False
|
||||
self.gpio_thread = Thread(target=self.read_gpio, daemon=True)
|
||||
self.gpio_thread.start()
|
||||
self.gpio_data = gpio.activity()
|
||||
|
||||
# init Arduino
|
||||
elif self.serial_enabled():
|
||||
|
|
Loading…
Reference in New Issue