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: ExperimentServer MotorShield QEI_pmw
Revision 8:98a83981c238, committed 2020-08-25
- Comitter:
- elijahsj
- Date:
- Tue Aug 25 23:38:34 2020 +0000
- Parent:
- 7:c31f30183ce1
- Child:
- 9:97360c92666f
- Commit message:
- Fixed HAL Libraries
Changed in this revision
--- a/FastPWM.lib Mon Aug 24 20:20:50 2020 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://os.mbed.com/users/elijahsj/code/FastPWM/#08e3f3230b7c
--- a/MotorShield.lib Mon Aug 24 20:20:50 2020 +0000 +++ b/MotorShield.lib Tue Aug 25 23:38:34 2020 +0000 @@ -1,1 +1,1 @@ -https://os.mbed.com/users/elijahsj/code/MotorShield/#f2ede00aed8a +https://os.mbed.com/users/elijahsj/code/MotorShield/#4c3c2b7337a6
--- a/main.cpp Mon Aug 24 20:20:50 2020 +0000
+++ b/main.cpp Tue Aug 25 23:38:34 2020 +0000
@@ -4,6 +4,7 @@
#include "ExperimentServer.h"
#include "QEI.h"
#include "MotorShield.h"
+#include "HardwareSetup.h"
#define NUM_INPUTS 2
#define NUM_OUTPUTS 3
@@ -22,20 +23,22 @@
AnalogIn currentC(PF_13); //MOTOR C CURRENT SENSOR
AnalogIn currentD(PA_4); //MOTOR D CURRENT SENSOR
-MotorShield motorA(PE_5, PE_6); //MOTOR A PWM
-MotorShield motorB(PB_14, PB_15); //MOTOR B PWM
-MotorShield motorC(PA_6, PF_9); //MOTOR C PWM
-MotorShield motorD(PF_6, PF_7); //MOTOR D PWM
-
-//deprecate the following
-PwmOut motorPWM(D5); // Motor PWM output
-DigitalOut motorFwd(D6); // Motor forward enable
-DigitalOut motorRev(D7); // Motor backward enable
-
-
+//MotorShield motorA(PE_5, PE_6); //MOTOR A PWM
+//MotorShield motorB(PB_14, PB_15); //MOTOR B PWM
+//MotorShield motorC(PA_6, PF_9); //MOTOR C PWM
+//MotorShield motorD(PF_6, PF_7); //MOTOR D PWM
int main (void)
{
+ initHardware(); // Setup PWM
+ wait_us(100);
+
+ TIM12->CCR2 = 100;
+ TIM12->CCR1 = 200;
+
+ while(1){
+ }
+ /*
// Link the terminal with our server and start it up
server.attachTerminal(pc);
server.init();
@@ -86,5 +89,6 @@
motorPWM.write(0);
} // end if
} // end while
+ */
} // end main