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, committed 2015-03-05
- Comitter:
- rosienej
- Date:
- Thu Mar 05 21:31:34 2015 +0000
- Child:
- 1:088d1710de36
- Commit message:
- An inital port to the Freescale.
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DMX.lib Thu Mar 05 21:31:34 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/rosienej/code/DMX-K46Z/#84a017ef96f8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SLCD.lib Thu Mar 05 21:31:34 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/Sissors/code/SLCD/#ef2b3b7f1b01
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Servo.lib Thu Mar 05 21:31:34 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/simon/code/Servo/#36b69a7ced07
--- /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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Mar 05 21:31:34 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9ad691361fac \ No newline at end of file