Smart lille high/low berørings knap
Kapacitiv berøringssensor
Denne komponent afsender en spænding når sensoren opfanger en berøring, og ingen spænding når der ikke er nogen berøring.
Tekniske specifikationer
Operativ spænding | 3.3V - 5V |
Interface | Digital |
Kode Eksempel
from machine import Pin
from time import sleep
touch = Pin(4, Pin.IN)
while True:
print("touch sensor vaerdi: ", touch.value())
sleep(0.1)
Pinout
Pinout
Nummer | Navn | Rolle |
---|---|---|
1 | V (VCC) | Positiv forsyning |
2 | S | Signal |
3 | G (GND) | Negativ forsyning |
Hvordan fungerer den?
Referencer
Github Kapacitiv berøringssensor micropython: https://github.com/mcauser/micropython-ttp223
ESP32 og Kapacitiv berøringssensor: https://nick.zoic.org/art/esp32-capacitive-sensors/
Inspiration og kommentarer
Er du faldet over links eller lignende, som kan være relevant for dine medstuderende så send os en mail på nini@kea.dk