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: mbed
Fork of Robotics_Lab_DCMotor by
Revision 1:6747911cdd90, committed 2016-04-07
- Comitter:
- YCTung
- Date:
- Thu Apr 07 23:00:14 2016 +0000
- Parent:
- 0:0971f0666990
- Child:
- 2:4d048af437fe
- Commit message:
- add speed unit
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Apr 07 22:53:48 2016 +0000
+++ b/main.cpp Thu Apr 07 23:00:14 2016 +0000
@@ -58,7 +58,7 @@
void timer1_interrupt(void)
{
//Motor 1
- v1 = (float)v1Count * 100.0f / 12.0f * 60.0f / 29.0f;
+ v1 = (float)v1Count * 100.0f / 12.0f * 60.0f / 29.0f; //unit: rpm
v1Count = 0;
///code for PI control///
@@ -73,7 +73,7 @@
//Motor 2
- v2 = (float)v2Count * 100.0f / 12.0f * 60.0f / 29.0f;
+ v2 = (float)v2Count * 100.0f / 12.0f * 60.0f / 29.0f; //unit: rpm
v2Count = 0;
///code for PI control///
