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: FastPWM mbed QEI biquadFilter HIDScope MODSERIAL
Diff: main.cpp
- Revision:
- 0:3ea1bbfbeaae
- Child:
- 1:e40e981acbf1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Sep 24 15:20:12 2018 +0000 @@ -0,0 +1,31 @@ +#include "mbed.h" +#include "FastPWM.h" + + +Ticker motor; + +FastPWM pin5(D5); +DigitalOut pin4(D4); +float u =0.7f; + + + +void draai(){ + + pin4 = u>0.0f; + pin5 = fabs(u); +} + + +int main() +{ + pin5.period_us(60); + motor.attach(draai, 1/16700); + while (true){ + pin5.write(u); + } + + + + +} \ No newline at end of file