cqegfgf fsgfgfdgsd / Mbed 2 deprecated test_hello

Dependencies:   mbed

Committer:
pcotret
Date:
Tue Oct 12 06:17:19 2010 +0000
Revision:
1:a6a4af9225c0
Parent:
0:6ec87c795bb0

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pcotret 1:a6a4af9225c0 1 #include "mbed.h"
pcotret 1:a6a4af9225c0 2
pcotret 1:a6a4af9225c0 3 // Déclarer les variables associées aux LEDs
pcotret 1:a6a4af9225c0 4 DigitalOut myled1(LED1);
pcotret 1:a6a4af9225c0 5 DigitalOut myled2(LED2);
pcotret 1:a6a4af9225c0 6 DigitalOut myled3(LED3);
pcotret 1:a6a4af9225c0 7 DigitalOut myled4(LED4);
pcotret 1:a6a4af9225c0 8
pcotret 1:a6a4af9225c0 9 // Programme principal
pcotret 1:a6a4af9225c0 10 int main()
pcotret 1:a6a4af9225c0 11 {
pcotret 1:a6a4af9225c0 12 while (1)
pcotret 1:a6a4af9225c0 13 {
pcotret 1:a6a4af9225c0 14 // LED 1
pcotret 1:a6a4af9225c0 15 myled1 = 1;
pcotret 1:a6a4af9225c0 16 wait(0.05);
pcotret 1:a6a4af9225c0 17 myled1 = 0;
pcotret 1:a6a4af9225c0 18 wait(0.05);
pcotret 1:a6a4af9225c0 19 // LED 2
pcotret 1:a6a4af9225c0 20 myled2 = 1;
pcotret 1:a6a4af9225c0 21 wait(0.1);
pcotret 1:a6a4af9225c0 22 myled2 = 0;
pcotret 1:a6a4af9225c0 23 wait(0.1);
pcotret 1:a6a4af9225c0 24 // LED 3
pcotret 1:a6a4af9225c0 25 myled3 = 1;
pcotret 1:a6a4af9225c0 26 wait(0.2);
pcotret 1:a6a4af9225c0 27 myled3 = 0;
pcotret 1:a6a4af9225c0 28 wait(0.2);
pcotret 1:a6a4af9225c0 29 // LED 4
pcotret 1:a6a4af9225c0 30 myled4 = 1;
pcotret 1:a6a4af9225c0 31 wait(0.4);
pcotret 1:a6a4af9225c0 32 myled4 = 0;
pcotret 1:a6a4af9225c0 33 wait(0.4);
pcotret 1:a6a4af9225c0 34 }
pcotret 1:a6a4af9225c0 35 }