Team repo
Embed:
(wiki syntax)
Show/hide line numbers
MagneticEnc.cpp
00001 #include "MagneticEnc.h" 00002 #include "mbed.h" 00003 00004 00005 MagneticEnc::MagneticEnc(PinName _PWMOUT, int _period, int _pulsewidth) : 00006 mypwm(_PWMOUT), period(_period), pulsewidth(_pulsewidth) { 00007 mypwm.period_ms(period); //10 00008 mypwm.pulsewidth_ms(pulsewidth); //1 00009 00010 } 00011 00012 float MagneticEnc::readEnc() { 00013 return mypwm.read(); 00014 } 00015
Generated on Sat Jul 16 2022 15:10:49 by
1.7.2