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.
main.cpp
00001 #include "mbed.h" 00002 00003 // LED connected Pin PC_0 00004 DigitalOut led(PC_0); 00005 00006 // Push-Button connected Pin PC_3 00007 DigitalIn pushButton(PC_3); 00008 00009 // Main Loop runs in its own thread in the OS 00010 int main() { 00011 00012 // Active Pull-Up Resistor 00013 pushButton.mode(PullUp); 00014 00015 // Inifite Loop 00016 while(1) { 00017 00018 // Check Push-Button 00019 if(pushButton == 0) { 00020 00021 // LED Turn-On 00022 led = 1; 00023 00024 } else { 00025 00026 // LED Turn-Off 00027 led = 0; 00028 } 00029 } 00030 } 00031 00032 00033 00034
Generated on Thu Jul 21 2022 19:36:13 by
1.7.2