Initial program test

Dependencies:   mbed

Committer:
ajwyates
Date:
Thu Oct 29 11:07:14 2020 +0000
Revision:
0:9aa186433182
Initial attempt to add new main c cpp

Who changed what in which revision?

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