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.
MagneticEncoder/MagneticEnc.cpp
- Committer:
- enderceylan
- Date:
- 2016-11-11
- Revision:
- 7:1ff48d6da827
- Parent:
- MagneticEnc.cpp@ 5:74fcd196ff96
File content as of revision 7:1ff48d6da827:
#include "MagneticEnc.h" #include "mbed.h" MagneticEnc::MagneticEnc(PinName _PWMOUT, int _period, int _pulsewidth) : mypwm(_PWMOUT), period(_period), pulsewidth(_pulsewidth) { mypwm.period_ms(period); //10 mypwm.pulsewidth_ms(pulsewidth); //1 } float MagneticEnc::readEnc() { return mypwm.read(); }