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.
Dependencies: Terminal EthernetNetIf Pachube TextLCD mbed ConfigFile FirmwareUpdater
trans.h
00001 #ifndef MBED_VOLTAGECONVERTER_H 00002 #define MBED_VOLTAGECONVERTER_H 00003 #include "mbed.h" 00004 00005 class Trans 00006 { 00007 00008 public: 00009 Trans(PinName pin,float period,float duty): _trans(pin){ 00010 _trans.period(period); 00011 _trans=0; 00012 _duty=duty; 00013 } 00014 void off(){ 00015 _trans=0; 00016 } 00017 void on(){ 00018 _trans=_duty; 00019 } 00020 00021 private: 00022 PwmOut _trans; 00023 float _duty; 00024 00025 00026 }; 00027 #endif
Generated on Wed Jul 13 2022 02:46:53 by
1.7.2