Arnoud Domhof / Mbed 2 deprecated Assignment_PES_controllers

Dependencies:   FastPWM HIDScope MODSERIAL QEI mbed

Revision:
0:50c494034326
Child:
1:d6acc3c6261a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Sep 24 14:48:19 2018 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+#include "FastPWM.h"
+#include "MODSERIAL.h"
+#include "HIDScope.h"
+
+
+AnalogIn  potmeter1(PTC10);
+AnalogIn  potmeter2(PTC11);
+MODSERIAL  pc(USBTX, USBRX);
+//D4 is a digital input for the microcontroller, so should be an digitalOut
+//from the K64F. It will tell the motor shiel to let Motor1 turn clockwise
+//of count clockwise (CW of CCW). D4 for motor 2
+DigitalOut directionM1(D4);
+DigitalOut directionM2(D7);
+//D5 is a PWM input for the motor controller and determines the PWM signal 
+//that the motor controller gives to Motor 1. Higher PWM, higer average voltage.
+// D6 for motor 2
+FastPWM motor1_pwm(D5);
+FastPWM motor2_pwm(D6);
+
+int frequency_pwm = 1000; // 1 kHz PWM
+motor1_pwm.period(1.0f/frequency_pwm); //T=1/f
+
+int main(void)
+{
+    
+    
+    
+    while(true){
+               
+        }
+    
+}
\ No newline at end of file