pin_control.py

# Ce travail est publié sous licence MIT.
# Copyright (c) 2013-2023 OpenMV LLC. Tous droits réservés.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# Exemple de contrôle de broche
#
# Cet exemple montre comment utiliser les broches d'E/S en mode GPIO sur votre OpenMV Cam.

from pyb import Pin

# Connectez un interrupteur à la broche 0 ; il la mettra à l'état bas lorsque l'interrupteur est fermé.
# La broche 1 s'allumera alors.
pin0 = Pin("D0", Pin.IN, Pin.PULL_UP)
pin1 = Pin("D1", Pin.OUT_PP, Pin.PULL_NONE)

while True:
    pin1.value(not pin0.value())

results matching ""

    No results matching ""