diff --git a/.vscode/settings.json b/.vscode/settings.json index fccbd96..410188f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,7 +4,10 @@ "python.analysis.extraPaths": [ "", "c:\\Users\\ebbe.bass\\.vscode\\extensions\\joedevivo.vscode-circuitpython-0.1.20-win32-x64\\stubs", - "c:\\Users\\ebbe.bass\\AppData\\Roaming\\Code\\User\\globalStorage\\joedevivo.vscode-circuitpython\\bundle\\20240326\\adafruit-circuitpython-bundle-py-20240326\\lib" + "c:\\Users\\ebbe.bass\\AppData\\Roaming\\Code\\User\\globalStorage\\joedevivo.vscode-circuitpython\\bundle\\20240602\\adafruit-circuitpython-bundle-py-20240602\\lib" ], - "circuitpython.board.version": null + "circuitpython.board.version": null, + "python.analysis.diagnosticSeverityOverrides": { + "reportMissingModuleSource": "none" + } } \ No newline at end of file diff --git a/code.py b/code.py index e718f0c..8dfeb4a 100644 --- a/code.py +++ b/code.py @@ -35,13 +35,16 @@ def interpolate_color(encoder_pos): fading_in_progress = False # Flag to indicate if fading animation is in progress + while True: enc_pos = encoder.position enc_pos = min(max(enc_pos, -25), 25) + print(enc_pos) # Process button press if not button.value and button_state is None: button_state = "pressed" + print("pressed") elif button.value and button_state == "pressed": lamp_state = not lamp_state # Toggle lamp state button_state = None # Reset button state