Here i'am at tmp/lab (http://www.tmplab.org/) workshop to learn more about the lily pad.
Thanks to lionel from http://tetalab.org/ i've learned a lot.
here is my fisrt code for making the led on the lilypad blinking :
La je suis a un atelier temp/lab (http://www.tmplab.org/) pour apprendre plus sur le lilypad.
Grace à lionel du tetalab http://tetalab.org/ j'ai beaucoup appris :
voici mon premier code :
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// declaration des variables
int court = 1000;
int longue = 2000;
int pause = 1000;
// initialisation du matos dans le setup
void setup() {
// initialize the digital pin as an output.
// pin 13 correspond a la led de la CM
// Pin 13 has an LED connected on most Arduino boards:
// pinmode declare la pin 13 output
pinMode(13, OUTPUT);
}
void loop() {
// high correpond a on
digitalWrite(13, HIGH); // set the LED on
// en milli seconde
delay(court); // wait for a second
// je l'eteint pendant une seconde
digitalWrite(13, LOW); // set the LED off
delay(longue); // wait for a second
}
Bussiere
Aucun commentaire:
Enregistrer un commentaire