TVZ Mechatronics Team / Mbed 2 deprecated L298N-Breakout-Test

Dependencies:   HBridgeDCMotor RateLimiter mbed

Files at this revision

API Documentation at this revision

Comitter:
tbjazic
Date:
Fri Dec 11 13:17:35 2015 +0000
Commit message:
Simple test of a L298N breakout board with two DC motors and a FRDM-K64F microcontroller board.

Changed in this revision

HBridgeDCMotor.lib Show annotated file Show diff for this revision Revisions of this file
RateLimiter.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HBridgeDCMotor.lib	Fri Dec 11 13:17:35 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/TVZ-Mechatronics-Team/code/HBridgeDCMotor/#1675a4c00925
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RateLimiter.lib	Fri Dec 11 13:17:35 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/TVZ-Mechatronics-Team/code/RateLimiter/#d735360f91f9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Dec 11 13:17:35 2015 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+#include "HBridgeDCMotor.h"
+
+HBridgeDCMotor m1(PTC10, PTC11);
+HBridgeDCMotor m2(D6, D7);
+
+int main() {
+    float sampleTime = 50e-3, switchingFrequency = 25e3, rampTime = 3;
+    m1.configure(sampleTime, switchingFrequency, rampTime, rampTime);
+    m2.configure(sampleTime, switchingFrequency, rampTime, rampTime);
+    while(true) {
+        m1.setDutyCycle(1);
+        m2.setDutyCycle(1);
+        wait(10);
+        m1.setDutyCycle(-1);
+        m2.setDutyCycle(-1);
+        wait(10);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Dec 11 13:17:35 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file