⚲
Projet
Général
Profil
Connexion
Accueil
Projets
Aide
Recherche
:
Accueil
Tous les projets
Accueil
Aperçu
Activité
Annonces
Documents
Wiki
Fichiers
Télécharger (1,21 ko)
Enzo Di Sotto
» LED.py
Enzo Di Sotto
, 17/11/2023 19:37
import
RPi.GPIO
as
GPIO
import
time
GPIO
.
setmode
(
GPIO
.
BCM
)
GPIO
.
setwarnings
(
False
)
GPIO
.
setup
(
4
,
GPIO
.
OUT
)
GPIO
.
setup
(
17
,
GPIO
.
OUT
)
GPIO
.
setup
(
27
,
GPIO
.
OUT
)
GPIO
.
setup
(
18
,
GPIO
.
OUT
)
GPIO
.
setup
(
23
,
GPIO
.
OUT
)
GPIO
.
setup
(
22
,
GPIO
.
OUT
)
GPIO
.
setup
(
24
,
GPIO
.
OUT
)
GPIO
.
setup
(
25
,
GPIO
.
OUT
)
GPIO
.
setup
(
26
,
GPIO
.
OUT
)
print
(
"LEDr1 on"
)
GPIO
.
output
(
4
,
GPIO
.
HIGH
)
time
.
sleep
(
1
)
print
(
"LEDr1 off"
)
GPIO
.
output
(
4
,
GPIO
.
LOW
)
print
(
"LEDr2 on"
)
GPIO
.
output
(
17
,
GPIO
.
HIGH
)
time
.
sleep
(
1
)
print
(
"LEDr2 off"
)
GPIO
.
output
(
17
,
GPIO
.
LOW
)
print
(
"LEDr3 on"
)
GPIO
.
output
(
27
,
GPIO
.
HIGH
)
time
.
sleep
(
1
)
print
(
"LEDr3 off"
)
GPIO
.
output
(
27
,
GPIO
.
LOW
)
print
(
"LEDv1 on"
)
GPIO
.
output
(
18
,
GPIO
.
HIGH
)
time
.
sleep
(
1
)
print
(
"LEDv1 off"
)
GPIO
.
output
(
18
,
GPIO
.
LOW
)
print
(
"LEDv2 on"
)
GPIO
.
output
(
23
,
GPIO
.
HIGH
)
time
.
sleep
(
1
)
print
(
"LEDv2 off"
)
GPIO
.
output
(
23
,
GPIO
.
LOW
)
print
(
"LEDv3 on"
)
GPIO
.
output
(
22
,
GPIO
.
HIGH
)
time
.
sleep
(
1
)
print
(
"LEDv3 off"
)
GPIO
.
output
(
22
,
GPIO
.
LOW
)
print
(
"LEDj1 on"
)
GPIO
.
output
(
24
,
GPIO
.
HIGH
)
time
.
sleep
(
1
)
print
(
"LEDj1 off"
)
GPIO
.
output
(
24
,
GPIO
.
LOW
)
print
(
"LEDj2 on"
)
GPIO
.
output
(
25
,
GPIO
.
HIGH
)
time
.
sleep
(
1
)
print
(
"LEDj2 off"
)
GPIO
.
output
(
25
,
GPIO
.
LOW
)
print
(
"LEDj3 on"
)
GPIO
.
output
(
26
,
GPIO
.
HIGH
)
time
.
sleep
(
1
)
print
(
"LEDj3 off"
)
GPIO
.
output
(
26
,
GPIO
.
LOW
)
« Précédent
1
…
14
15
16
17
18
…
47
Suivant »
(16-16/47)
Chargement...