This commit is contained in:
ohsqueezy 2022-12-18 20:44:36 -05:00
commit 66d9eabfe5
2 changed files with 9 additions and 3 deletions

10
NS.py
View File

@ -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():

2
config
View File

@ -22,7 +22,7 @@ data-exclude = local/, *.pyc, .git*, README, build/, dist/, *.egg-info, *.py, MA
[display]
caption = Scrapeboard
show-framerate = yes
show-framerate = no
framerate-position = 600, 0
dimensions = 800, 450
fullscreen = no