⚲
Projet
Général
Profil
Connexion
S'enregistrer
Accueil
Projets
Aide
Recherche
:
Polytech Ge Sous Traitance
Tous les projets
Polytech Projets Ge
»
Polytech Ge Sous Traitance
Aperçu
Activité
Roadmap
Demandes
Gantt
Calendrier
Annonces
Documents
Wiki
Fichiers
Dépôt
Télécharger (579 octets)
Faire bouger la boule
» hamster.ino
Boule de hamster code -
Anonyme, 26/11/2021 14:15
#include
<Servo.h>
Servo
servo1
;
Servo
servo2
;
Servo
servo3
;
Servo
servo4
;
const
char
servoPin1
=
3
;
// green
const
char
servoPin2
=
5
;
//blue 0
const
char
servoPin3
=
9
;
// red
const
char
servoPin4
=
11
;
void
setup
()
{
servo1
.
attach
(
servoPin1
);
servo2
.
attach
(
servoPin2
);
servo3
.
attach
(
servoPin3
);
servo4
.
attach
(
servoPin4
);
}
void
loop
()
{
servo1
.
write
(
180
);
servo2
.
write
(
180
);
servo3
.
write
(
0
);
servo4
.
write
(
0
);
delay
(
1000
);
servo1
.
write
(
0
);
servo2
.
write
(
0
);
servo3
.
write
(
180
);
servo4
.
write
(
180
);
delay
(
1000
);
}
« Précédent
1
2
Suivant »
(2-2/2)
Chargement...