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.
led.h
00001 #ifndef LED_H 00002 #define LED_H 00003 00004 #include "mbed.h" 00005 00006 class led{ 00007 public: 00008 led(PinName name); 00009 00010 /** 00011 *turn on led 00012 */ 00013 void on(); 00014 00015 /** 00016 *turn of led 00017 */ 00018 void off(); 00019 00020 /** 00021 * toggles state of led 00022 */ 00023 void toggle(); 00024 00025 /** 00026 *make led blink once, given a duraiton in seconds 00027 */ 00028 void blink(int time); 00029 00030 private: 00031 00032 /** 00033 *the led on the board 00034 */ 00035 DigitalOut myled; 00036 00037 }; 00038 00039 00040 00041 #endif 00042 00043
Generated on Sun Sep 11 2022 14:00:03 by
1.7.2