Fin séance programmaiton 1
This commit is contained in:
parent
585d594353
commit
b2fb9fccfe
20
main.c
20
main.c
@ -11,8 +11,24 @@ void main(void)
|
||||
{
|
||||
stdio_init_all();
|
||||
|
||||
gpio_init(25);
|
||||
// Initialisation de la led verte
|
||||
gpio_init(18);
|
||||
gpio_set_dir(18, 1);
|
||||
|
||||
// Initialisation de la led rouge
|
||||
gpio_init(13);
|
||||
gpio_set_dir(13, 1);
|
||||
|
||||
// Allume les LED
|
||||
gpio_put(18, 1);
|
||||
gpio_put(13, 1);
|
||||
|
||||
while(1){
|
||||
sleep_ms(500);
|
||||
gpio_put(18, 1);
|
||||
gpio_put(13, 1);
|
||||
sleep_ms(500);
|
||||
gpio_put(18, 0);
|
||||
gpio_put(13, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user