diff --git a/CircuitPython_Knob_Sketcher/bigger_sketcher.py b/CircuitPython_Knob_Sketcher/bigger_sketcher.py index 3ea9eef2..3060485d 100755 --- a/CircuitPython_Knob_Sketcher/bigger_sketcher.py +++ b/CircuitPython_Knob_Sketcher/bigger_sketcher.py @@ -1,4 +1,5 @@ -import board, busio +import board +import busio import adafruit_ssd1306 from simpleio import map_range from analogio import AnalogIn @@ -34,9 +35,9 @@ def read_knobs(reads): avg_y += y_knob.value avg_x /= reads avg_y /= reads - x = map_range(avg_x, 0, 65535, 0, WIDTH - 1) - y = map_range(avg_y, 0, 65535, 0, HEIGHT - 1) - return int(x), int(y) + x_screen = map_range(avg_x, 0, 65535, 0, WIDTH - 1) + y_screen = map_range(avg_y, 0, 65535, 0, HEIGHT - 1) + return int(x_screen), int(y_screen) while True: while clear_button.value: diff --git a/CircuitPython_Knob_Sketcher/tiny_sketcher.py b/CircuitPython_Knob_Sketcher/tiny_sketcher.py index 2045f945..9c99ee98 100755 --- a/CircuitPython_Knob_Sketcher/tiny_sketcher.py +++ b/CircuitPython_Knob_Sketcher/tiny_sketcher.py @@ -1,4 +1,5 @@ -import board, busio +import board +import busio import adafruit_ssd1306 from simpleio import map_range from analogio import AnalogIn