Jack Justice / Mbed 2 deprecated Hello_World_LED_Blink

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Durka_Durk_Dur
Date:
Tue Oct 01 23:06:46 2019 +0000
Parent:
3:61213dad644b
Commit message:
Made the project be just this workshop alone.

Changed in this revision

Hello_World_LED_Blink/hello_world.cpp Show diff for this revision Revisions of this file
Hello_World_LED_Blink/mbed.bld Show diff for this revision Revisions of this file
hello_world.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Hello_World_LED_Blink/hello_world.cpp	Tue Oct 01 22:59:47 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-// Author:  Jack Justice
-// Created: 10-1-2019
-
-#include "mbed.h"
-
-#define LED_PIN D7
-
-int main()
-{
-    // Documentation on Serial API >> https://os.mbed.com/docs/mbed-os/v5.14/mbed-os-api-doxy/classmbed_1_1_serial.html
-    
-    // If I wished to set some baud, I could add the baud in as a third param
-    //   in the Serial object initialization.
-    Serial UART(USBTX, USBRX);     // UART(TX_pin, RX_pin, baud);
-    UART.printf("Hello World!\n");
-    
-    // Documentation on DigitalOut API >> https://os.mbed.com/docs/mbed-os/v5.14/mbed-os-api-doxy/classmbed_1_1_digital_out.html
-    
-    // Let's start toggling our LED by initializing D7 to be off.
-    DigitalOut led(LED_PIN, 0);
-    
-    while(true)
-    {
-        // The 'F' on the end of 0.5 is there to force the compiler to treat 0.5 as a float.
-        //   It may treat it like an integer, making the wait function not pause.
-        wait(0.5F);
-        
-        // Documentation on Wait function >> https://os.mbed.com/docs/mbed-os/v5.14/apis/wait.html
-        
-        // Because the LED's initial state is off, we must turn it on.
-        // ON == 1, OFF == 0
-        led.write(1);
-        
-        // Wait for half a second
-        wait(0.5F);
-        
-        // And turn the LED off
-        led.write(0);
-    }
-}
\ No newline at end of file
--- a/Hello_World_LED_Blink/mbed.bld	Tue Oct 01 22:59:47 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hello_world.cpp	Tue Oct 01 23:06:46 2019 +0000
@@ -0,0 +1,40 @@
+// Author:  Jack Justice
+// Created: 10-1-2019
+
+#include "mbed.h"
+
+#define LED_PIN D7
+
+int main()
+{
+    // Documentation on Serial API >> https://os.mbed.com/docs/mbed-os/v5.14/mbed-os-api-doxy/classmbed_1_1_serial.html
+    
+    // If I wished to set some baud, I could add the baud in as a third param
+    //   in the Serial object initialization.
+    Serial UART(USBTX, USBRX);     // UART(TX_pin, RX_pin, baud);
+    UART.printf("Hello World!\n");
+    
+    // Documentation on DigitalOut API >> https://os.mbed.com/docs/mbed-os/v5.14/mbed-os-api-doxy/classmbed_1_1_digital_out.html
+    
+    // Let's start toggling our LED by initializing D7 to be off.
+    DigitalOut led(LED_PIN, 0);
+    
+    while(true)
+    {
+        // The 'F' on the end of 0.5 is there to force the compiler to treat 0.5 as a float.
+        //   It may treat it like an integer, making the wait function not pause.
+        wait(0.5F);
+        
+        // Documentation on Wait function >> https://os.mbed.com/docs/mbed-os/v5.14/apis/wait.html
+        
+        // Because the LED's initial state is off, we must turn it on.
+        // ON == 1, OFF == 0
+        led.write(1);
+        
+        // Wait for half a second
+        wait(0.5F);
+        
+        // And turn the LED off
+        led.write(0);
+    }
+}
\ No newline at end of file