Test program for the RenBuggy drive boards

Dependencies:   mbed SevenSegmentDisplay

Files at this revision

API Documentation at this revision

Comitter:
ELloyd
Date:
Thu Mar 13 13:29:36 2014 +0000
Child:
1:c6cf7028e4a8
Commit message:
Version 1

Changed in this revision

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/main.cpp	Thu Mar 13 13:29:36 2014 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+
+/*Pins needed:                  *
+    -   DIP24   Open drain      *
+    D   DIP25   PwmOut          *
+    M   DIP27   InterruptIn     *
+    S   DIP28   DigitalOut      *
+    +   DIP30   DigitalOut      */
+
+DigitalIn   Minus(p24);     //0V
+PwmOut      D(p25);         //Drive
+InterruptIn M(p27);         //Motor
+DigitalOut  S(p28);         //Stop (brake)
+DigitalIn  Plus(p30);      //V+ - 3v3? (will be digital out eventually)
+
+int main()
+{
+    Minus.mode(OpenDrain); //Open drain to act as a GND
+    Plus.mode(OpenDrain);   //Seeing if any pins want to behave
+    //Set up the PWM - 50% duty to check the output of the M pin.
+    //Period defaults to 20ms. I think that's acceptable.
+    D = 0.5; //Duty cycle set to 50%
+    while (1)
+    {
+        D = 0.5;
+        wait(0.5);
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Mar 13 13:29:36 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8e73be2a2ac1
\ No newline at end of file