diff --git a/NS.py b/NS.py index dcfb9ea..d493a94 100644 --- a/NS.py +++ b/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(): diff --git a/config b/config index a871f85..1d6f2db 100644 --- a/config +++ b/config @@ -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