Teaching Chloe C (and maybe C++) / Mbed 2 deprecated Exercise6

Dependencies:   mbed

Fork of Exercise6 by Andrew Brown

Committer:
drewantech
Date:
Mon Feb 24 13:09:19 2020 +0000
Revision:
0:cb7457d7c822
Child:
1:245bc5eb1bbe
Exercise 1 for Chloe.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
drewantech 0:cb7457d7c822 1 #include "mbed.h"
drewantech 0:cb7457d7c822 2
drewantech 0:cb7457d7c822 3 DigitalOut myled(LED1);
drewantech 0:cb7457d7c822 4
drewantech 0:cb7457d7c822 5 int main() {
drewantech 0:cb7457d7c822 6 while(1) {
drewantech 0:cb7457d7c822 7 myled = 1; // LED is ON
drewantech 0:cb7457d7c822 8 wait(0.2); // 200 ms
drewantech 0:cb7457d7c822 9 myled = 0; // LED is OFF
drewantech 0:cb7457d7c822 10 wait(1.0); // 1 sec
drewantech 0:cb7457d7c822 11 }
drewantech 0:cb7457d7c822 12 }