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.
Diff: main.cpp
- Revision:
- 18:12598db37e38
- Parent:
- 16:d4948633c559
- Parent:
- 15:b6025338e0eb
- Child:
- 20:c3bdb8f73c02
--- a/main.cpp Tue Mar 14 22:14:41 2017 +0000
+++ b/main.cpp Tue Mar 14 22:22:55 2017 +0000
@@ -2,6 +2,7 @@
#include "rtos.h"
#include "definitions.h"
#include "motorControl.h"
+#include "parser.h"
#define kp 0.75f
#define ki 0.5f
@@ -87,7 +88,7 @@
dt_I3.start(); //Start the time counters for velocity
- //controlTicker.attach(&control, dt);
+ controlTicker.attach(&control, dt);
I1.rise(&i_edge); //Assign interrupt handlers for LEDs
I1.fall(&i_edge);
@@ -105,6 +106,7 @@
motorOut((state-orState+lead+6)%6, 1.0f); //Kickstart the motor
while (count_i3 <= goalRevs) {
+
pc.printf("Speed: %f, duty cycle: %f, revs done: %d \n\r",w3, duty, count_i3);
/*
if(duty < 0.00f) {
