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: FastPWM HIDScope MODSERIAL mbed
Revision 0:50c494034326, committed 2018-09-24
- Comitter:
- Mirjam
- Date:
- Mon Sep 24 14:48:19 2018 +0000
- Child:
- 1:d6acc3c6261a
- Commit message:
- Declaration of in and outputs. Bug on set of pwm
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FastPWM.lib Mon Sep 24 14:48:19 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/Sissors/code/FastPWM/#c0b2265cff9c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/HIDScope.lib Mon Sep 24 14:48:19 2018 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/tomlankhorst/code/HIDScope/#d23c6edecc49
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MODSERIAL.lib Mon Sep 24 14:48:19 2018 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/Sissors/code/MODSERIAL/#da0788f0bd77
--- /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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Sep 24 14:48:19 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187 \ No newline at end of file