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.
main.cpp
- Committer:
- jasonliujc
- Date:
- 2015-12-04
- Revision:
- 8:1ce513eff545
- Parent:
- 3:7ca21112a13d
- Child:
- 9:fd77a619181d
File content as of revision 8:1ce513eff545:
#include "mbed.h" #include "pid.h" Ticker Systicker; //////setting the errors for PID ctrl obj; void systick(){ //rotations float error = rotationError(); obj.updateErr(error); float corr = obj.total(); leftMotor.addToPwm(corr); rightMotor.addToPwm(-corr); } int main() { Systicker.attach_us(&systick,1000); rightMotor.setPwm(1.0); leftMotor.setPwm(1.0); return 0; } /// add something