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:
- 9:fd77a619181d
- Parent:
- 8:1ce513eff545
- Child:
- 10:332a4ad5911d
File content as of revision 9:fd77a619181d:
#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); pc.printf("%f",error); } int main() { Systicker.attach_us(&systick,1000); rightMotor.setPwm(1.0); leftMotor.setPwm(1.0); pc.printf("Hello!"); return 0; } /// add something