Sommaire |
Cube led 3x3x3
une deuxième ligne apparait au bon endroit
En cours de réalisation
<int led1=2; int led2=3; int led3=4; int led4=5; int led5=6; int led6=7; int led7=8; int led8=9; int led9=10; int masse1=11; int masse2=12; int masse3=13;
void setup(){
pinMode(led1,OUTPUT); pinMode(led2,OUTPUT); pinMode(led3,OUTPUT); pinMode(led4,OUTPUT); pinMode(led5,OUTPUT); pinMode(led6,OUTPUT); pinMode(led7,OUTPUT); pinMode(led8,OUTPUT); pinMode(led9,OUTPUT); pinMode(masse1,OUTPUT); pinMode(masse2,OUTPUT); pinMode(masse3,OUTPUT);
}
void loop(){
for (float i=10;i>0.05;i=i-0.05){ digitalWrite(masse1,LOW); digitalWrite(masse2,HIGH); digitalWrite(masse3,HIGH); digitalWrite(led1,HIGH); delay(i); digitalWrite(led1,LOW); delay(i); digitalWrite(led2,HIGH); delay(i); digitalWrite(led2,LOW); delay(i); digitalWrite(led3,HIGH); delay(i); digitalWrite(led3,LOW); delay(i); digitalWrite(led4,HIGH); delay(i); digitalWrite(led4,LOW); delay(i); digitalWrite(led5,HIGH); delay(i); digitalWrite(led5,LOW); delay(i); digitalWrite(led6,HIGH); delay(i); digitalWrite(led6,LOW); delay(i); digitalWrite(led7,HIGH); delay(i); digitalWrite(led7,LOW); delay(i); digitalWrite(led8,HIGH); delay(i); digitalWrite(led8,LOW); delay(i); digitalWrite(led9,HIGH); delay(i); digitalWrite(led9,LOW); delay(i); digitalWrite(masse1,HIGH); digitalWrite(masse2,LOW); digitalWrite(masse3,HIGH); digitalWrite(led1,HIGH); delay(i); digitalWrite(led1,LOW); delay(i); digitalWrite(led2,HIGH); delay(i); digitalWrite(led2,LOW); delay(i); digitalWrite(led3,HIGH); delay(i); digitalWrite(led3,LOW); delay(i); digitalWrite(led4,HIGH); delay(i); digitalWrite(led4,LOW); delay(i); digitalWrite(led5,HIGH); delay(i); digitalWrite(led5,LOW); delay(i); digitalWrite(led6,HIGH); delay(i); digitalWrite(led6,LOW); delay(i); digitalWrite(led7,HIGH); delay(i); digitalWrite(led7,LOW); delay(i); digitalWrite(led8,HIGH); delay(i); digitalWrite(led8,LOW); delay(i); digitalWrite(led9,HIGH); delay(i); digitalWrite(led9,LOW); delay(i); digitalWrite(masse1,HIGH); digitalWrite(masse2,HIGH); digitalWrite(masse3,LOW); digitalWrite(led1,HIGH); delay(i); digitalWrite(led1,LOW); delay(i); digitalWrite(led2,HIGH); delay(i); digitalWrite(led2,LOW); delay(i); digitalWrite(led3,HIGH); delay(i); digitalWrite(led3,LOW); delay(i); digitalWrite(led4,HIGH); delay(i); digitalWrite(led4,LOW); delay(i); digitalWrite(led5,HIGH); delay(i); digitalWrite(led5,LOW); delay(i); digitalWrite(led6,HIGH); delay(i); digitalWrite(led6,LOW); delay(i); digitalWrite(led7,HIGH); delay(i); digitalWrite(led7,LOW); delay(i); digitalWrite(led8,HIGH); delay(i); digitalWrite(led8,LOW); delay(i); digitalWrite(led9,HIGH); delay(i); digitalWrite(led9,LOW); delay(i); digitalWrite(masse1,HIGH); digitalWrite(masse2,LOW); digitalWrite(masse3,HIGH); digitalWrite(led1,HIGH); delay(i); digitalWrite(led1,LOW); delay(i); digitalWrite(led2,HIGH); delay(i); digitalWrite(led2,LOW); delay(i); digitalWrite(led3,HIGH); delay(i); digitalWrite(led3,LOW); delay(i); digitalWrite(led4,HIGH); delay(i); digitalWrite(led4,LOW); delay(i); digitalWrite(led5,HIGH); delay(i); digitalWrite(led5,LOW); delay(i); digitalWrite(led6,HIGH); delay(i); digitalWrite(led6,LOW); delay(i); digitalWrite(led7,HIGH); delay(i); digitalWrite(led7,LOW); delay(i); digitalWrite(led8,HIGH); delay(i); digitalWrite(led8,LOW); delay(i); digitalWrite(led9,HIGH); delay(i); digitalWrite(led9,LOW); delay(i);
}>
//attention à bien documenter le cod
e ! </pre>
chercher ici : http://wikidebrouillard.org/index.php/Catégorie:Arduino
quelles peuvent être les applications technologique de ce montage, ou est-ce qu'on retrouve des programme qui y ressemble ?
© Graphisme : Les Petits Débrouillards Grand Ouest (Patrice Guinche - Jessica Romero) | Développement web : Libre Informatique