Skip to content

Commit 1f2add9

Browse files
authored
Merge pull request #1670 from kattni/template-cleanup
Template cleanup.
2 parents df95c88 + fda69dc commit 1f2add9

25 files changed

Lines changed: 67 additions & 109 deletions

File tree

Adafruit_ItsyBitsy_RP2040/neopixel_rainbow/code.py

Lines changed: 0 additions & 22 deletions
This file was deleted.
File renamed without changes.

Adafruit_Neo_Trinkey/cap_touch_neopixel_brightness.py renamed to Adafruit_Neo_Trinkey/cap_touch_neopixel_brightness/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""CircuitPython Capacitive Touch NeoPixel Brightness Control Exmaple"""
1+
"""CircuitPython Capacitive Touch NeoPixel Brightness Control Example"""
22
import time
33
import board
44
import touchio
File renamed without changes.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""CircuitPython analog pin value example"""
2+
import time
3+
import board
4+
import analogio
5+
6+
analog_pin = analogio.AnalogIn(board.A0)
7+
8+
while True:
9+
print(analog_pin.value)
10+
time.sleep(0.1)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""CircuitPython analog voltage value example"""
2+
import time
3+
import board
4+
import analogio
5+
6+
analog_pin = analogio.AnalogIn(board.A0)
7+
8+
9+
def get_voltage(pin):
10+
return (pin.value * 3.3) / 65535
11+
12+
13+
while True:
14+
print(get_voltage(analog_pin))
15+
time.sleep(0.1)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)