Opzetje
Dependencies: mbed QEI HIDScope biquadFilter MODSERIAL FastPWM
main.cpp
- Committer:
- boydmartherus
- Date:
- 2019-09-23
- Revision:
- 6:3930811edddf
- Parent:
- 4:86872b89b21c
- Child:
- 7:2f612f32711a
File content as of revision 6:3930811edddf:
#include "mbed.h" #include "MODSERIAL.h" #include "FastPWM.h" Serial pc(USBTX,USBRX); InterruptIn button1(PTC2); InterruptIn button2(PTC3); InterruptIn button3(PTA4); InterruptIn button4(PTC6); AnalogIn pot(PTB2); FastPWM motor(D5); Ticker ticker; void motor_speed() { motor.write(pot); } int main() { ticker.attach(&motor_speed, 0.001f); while(true){}; }