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: Encoder MODSERIAL mbed
Fork of P_controller_motor_Bouke by
Revision 8:80cb1f5d561e, committed 2015-09-17
- Comitter:
- ThomasBNL
- Date:
- Thu Sep 17 12:18:40 2015 +0000
- Parent:
- 7:961dcef17e08
- Child:
- 9:3278558361a5
- Commit message:
- changed motorP_controller
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Sep 17 12:14:26 2015 +0000
+++ b/main.cpp Thu Sep 17 12:18:40 2015 +0000
@@ -25,12 +25,10 @@
{
return Kp*error;
}
-
-// Motor function
// Error measurement and apply the output to the plant
-void motorP_Controller()
+double motorP_Controller()
{
double reference_position = potmeter1.read();
double position = Convert_volt_to_position*encoder1.getPosition();
