makoto abe / Mbed 2 deprecated geigercounter04

Dependencies:   Terminal EthernetNetIf Pachube TextLCD mbed ConfigFile FirmwareUpdater

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers trans.h Source File

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