Remove ESP32-S2 examples to be replaced.
This commit is contained in:
parent
a616e6c91e
commit
fe33ebc503
12 changed files with 0 additions and 213 deletions
|
|
@ -1,19 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
# SPDX-License-Identifier: Unlicense
|
||||
"""
|
||||
CircuitPython analog voltage value example
|
||||
"""
|
||||
import time
|
||||
import board
|
||||
import analogio
|
||||
|
||||
analog_pin = analogio.AnalogIn(board.A0)
|
||||
|
||||
|
||||
def get_voltage(pin):
|
||||
return (pin.value * 2.6) / 51375
|
||||
|
||||
|
||||
while True:
|
||||
print(get_voltage(analog_pin))
|
||||
time.sleep(0.1)
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
# SPDX-License-Identifier: Unlicense
|
||||
"""
|
||||
CircuitPython Capacitive Touch Pin Example - Print to the serial console when one pin is touched.
|
||||
"""
|
||||
import time
|
||||
import board
|
||||
import touchio
|
||||
|
||||
touch = touchio.TouchIn(board.A4)
|
||||
|
||||
while True:
|
||||
if touch.value:
|
||||
print("Pin touched!")
|
||||
time.sleep(0.1)
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
# SPDX-License-Identifier: Unlicense
|
||||
"""
|
||||
CircuitPython Capacitive Two Touch Pin Example - Print to the serial console when a pin is touched.
|
||||
"""
|
||||
import time
|
||||
import board
|
||||
import touchio
|
||||
|
||||
touch_one = touchio.TouchIn(board.A4)
|
||||
touch_two = touchio.TouchIn(board.A5)
|
||||
|
||||
while True:
|
||||
if touch_one.value:
|
||||
print("Pin one touched!")
|
||||
if touch_two.value:
|
||||
print("Pin two touched!")
|
||||
time.sleep(0.1)
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
"""
|
||||
CircuitPython Digital Input Example - Blinking an LED using a button switch.
|
||||
"""
|
||||
import board
|
||||
import digitalio
|
||||
|
||||
led = digitalio.DigitalInOut(board.LED)
|
||||
led.direction = digitalio.Direction.OUTPUT
|
||||
|
||||
button = digitalio.DigitalInOut(board.D5)
|
||||
button.switch_to_input(pull=digitalio.Pull.UP)
|
||||
|
||||
while True:
|
||||
if not button.value:
|
||||
led.value = True
|
||||
else:
|
||||
led.value = False
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2022 Kattni Rembor for Adafruit Industries
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""CircuitPython Analog In Voltage Example"""
|
||||
import time
|
||||
import board
|
||||
import analogio
|
||||
|
||||
analog_pin = analogio.AnalogIn(board.A0)
|
||||
|
||||
|
||||
def get_voltage(pin):
|
||||
return (pin.value * 2.64) / 52507
|
||||
|
||||
|
||||
while True:
|
||||
print(get_voltage(analog_pin))
|
||||
time.sleep(0.1)
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""
|
||||
CircuitPython Capacitive Touch Pin Example - Print to the serial console when one pin is touched.
|
||||
"""
|
||||
import time
|
||||
import board
|
||||
import touchio
|
||||
|
||||
touch = touchio.TouchIn(board.A5)
|
||||
|
||||
while True:
|
||||
if touch.value:
|
||||
print("Pin touched!")
|
||||
time.sleep(0.1)
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""
|
||||
CircuitPython Capacitive Two Touch Pin Example - Print to the serial console when a pin is touched.
|
||||
"""
|
||||
import time
|
||||
import board
|
||||
import touchio
|
||||
|
||||
touch_one = touchio.TouchIn(board.A5)
|
||||
touch_two = touchio.TouchIn(board.D5)
|
||||
|
||||
while True:
|
||||
if touch_one.value:
|
||||
print("Pin one touched!")
|
||||
if touch_two.value:
|
||||
print("Pin two touched!")
|
||||
time.sleep(0.1)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""
|
||||
CircuitPython Digital Input Example - Blinking an LED using a button switch.
|
||||
"""
|
||||
import board
|
||||
import digitalio
|
||||
|
||||
led = digitalio.DigitalInOut(board.LED)
|
||||
led.direction = digitalio.Direction.OUTPUT
|
||||
|
||||
button = digitalio.DigitalInOut(board.BUTTON)
|
||||
button.switch_to_input(pull=digitalio.Pull.UP)
|
||||
|
||||
while True:
|
||||
if not button.value:
|
||||
led.value = True
|
||||
else:
|
||||
led.value = False
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""
|
||||
CircuitPython analog voltage value example
|
||||
"""
|
||||
import time
|
||||
import board
|
||||
import analogio
|
||||
|
||||
analog_pin = analogio.AnalogIn(board.A0)
|
||||
|
||||
|
||||
def get_voltage(pin):
|
||||
return (pin.value * 2.6) / 51653
|
||||
|
||||
|
||||
while True:
|
||||
print(get_voltage(analog_pin))
|
||||
time.sleep(0.1)
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""
|
||||
CircuitPython Capacitive Touch Pin Example - Print to the serial console when one pin is touched.
|
||||
"""
|
||||
import time
|
||||
import board
|
||||
import touchio
|
||||
|
||||
touch = touchio.TouchIn(board.A2)
|
||||
|
||||
while True:
|
||||
if touch.value:
|
||||
print("Pin touched!")
|
||||
time.sleep(0.1)
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
# SPDX-License-Identifier: Unlicense
|
||||
"""
|
||||
CircuitPython Capacitive Two Touch Pin Example - Print to the serial console when a pin is touched.
|
||||
"""
|
||||
import time
|
||||
import board
|
||||
import touchio
|
||||
|
||||
touch_one = touchio.TouchIn(board.A2)
|
||||
touch_two = touchio.TouchIn(board.TX)
|
||||
|
||||
while True:
|
||||
if touch_one.value:
|
||||
print("Pin one touched!")
|
||||
if touch_two.value:
|
||||
print("Pin two touched!")
|
||||
time.sleep(0.1)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""
|
||||
CircuitPython Digital Input example - Blinking a built-in NeoPixel LED using a button switch.
|
||||
"""
|
||||
import board
|
||||
import digitalio
|
||||
import neopixel
|
||||
|
||||
pixel = neopixel.NeoPixel(board.NEOPIXEL, 1)
|
||||
|
||||
button = digitalio.DigitalInOut(board.BUTTON)
|
||||
button.switch_to_input(pull=digitalio.Pull.UP)
|
||||
|
||||
while True:
|
||||
if not button.value:
|
||||
pixel.fill((255, 0, 0))
|
||||
else:
|
||||
pixel.fill((0, 0, 0))
|
||||
Loading…
Reference in a new issue