A DMX based Dowser for projectors.

Dependencies:   DMX-K46Z SLCD Servo mbed

This is an update to map to the Freescale platform. DMX 512.

Revision:
0:216a04cfcd28
Child:
1:088d1710de36
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Mar 05 21:31:34 2015 +0000
@@ -0,0 +1,48 @@
+#include "mbed.h"
+#include "SLCD.h"
+#include "Servo.h"
+#include "DMX.h"
+
+// The Switch Resources
+DigitalOut S1o(PTB19);
+DigitalOut S2o(PTC7);
+
+DigitalOut LD1(LED1);
+DigitalOut LD2(LED2);
+
+
+DigitalIn  S1i0(PTD3,PullDown);
+DigitalIn  S1i1(PTB18,PullDown);
+
+DigitalIn  S2i0(PTC8,PullDown);
+DigitalIn  S2i1(PTC6,PullDown);
+
+
+// The LCD display
+
+SLCD slcd;
+
+// The Servo
+   Servo Shutter(PTC1);  // put this on a PWM pin
+
+// The DMX protocol
+   DMX dmx(PTE16, PTE17);  // put it on a serial port DMX (PinName p_tx, PinName p_rx); 
+
+int main()
+{
+    
+    
+    int position1 =0;
+    int position2 =0;
+    S1o=1;
+    S2o=1;
+    
+    while (true) {
+       position1 = S1i0 + (S1i1<<1);
+       position2 = S2i0 + (S2i1<<1);
+       
+       slcd.Home();
+       slcd.printf("%2d",position1*4+position2);
+       
+    }
+}
\ No newline at end of file