Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 4:c2467cce98c3, committed 2019-10-01
- 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
--- 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