Direkt zum Inhalt

Drehimpulsgeber

Bewertungen
Serlo | 1.5.2019 | 22:31

import rotaryio import board import digitalio import time button = digitalio.DigitalInOut(board.D5) button.direction = digitalio.Direction.INPUT button.pull = digitalio.Pull.UP encoder = rotaryio.IncrementalEncoder(board.D6, board.D9) button_state = None last_position = ...