Format Mini Theramin
MODIFY
Trinket_Gemma_Mini_Theramin/Trinket_Gemma_Mini_Theramin.py
Trinket_Gemma_Mini_Theramin/Trinket_Gemma_Mini_Theramin.py
-# Adafruit Trinket/Gemma Example: Simple Theramin
-# Read the voltage from a Cadmium Sulfide (CdS) photocell voltage
-# divider and output a corresponding tone to a piezo buzzer
-#
-# Photocell voltage divider center wire to GPIO #2 (analog 1)
-# and output tone to GPIO #0 (digital 0)
+"""
+Adafruit Trinket/Gemma Example: Simple Theramin
+Read the voltage from a Cadmium Sulfide (CdS) photocell voltage
+divider and output a corresponding tone to a piezo buzzer
+Photocell voltage divider center wire to GPIO #2 (analog 1)
+and output tone to GPIO #0 (digital 0)
+"""
+
+import time
+
+import analogio
import board
import pulseio
-import analogio
-import time
photocell_pin = board.A1 # CdS photocell connected to this ANALOG pin
speaker_pin = board.D0 # Speaker is connected to this DIGITAL pin

Format Mini Theramin