111

Dependencies:   BufferedSerial FastPWM mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pumpt.cpp Source File

pumpt.cpp

00001 /*
00002  * pumpt.cpp
00003  *
00004  *  Created on: 2016. 4. 11.
00005  *      Author: right
00006  */
00007 
00008 #include "pumpt.h"
00009 
00010 pump_t::pump_t() {
00011     // TODO Auto-generated constructor stub
00012 
00013 }
00014 
00015 pump_t::pump_t(FastPWM *_out)
00016 {
00017     out=_out;
00018     out->period_ms(1);
00019 }
00020 
00021 pump_t::~pump_t() {
00022     // TODO Auto-generated destructor stub
00023 }
00024 
00025 void pump_t::setPWM(float PWMvalue)
00026 {
00027     out->pulsewidth_us(1000*PWMvalue);
00028 }
00029