DMX-Test for DMX-ST

Dependencies:   DMX-ST mbed-src

This library does'nt work as I have no DMX board for my STM-DISCO

Committer:
Gottfried
Date:
Sat Dec 12 13:58:02 2015 +0000
Revision:
1:a885240933b7
Parent:
0:8690adb11199
some changes

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Gottfried 0:8690adb11199 1 #include "mbed.h"
Gottfried 0:8690adb11199 2 #include "DMX.h"
Gottfried 0:8690adb11199 3
Gottfried 0:8690adb11199 4 DigitalOut myled(LED1);
Gottfried 0:8690adb11199 5
Gottfried 0:8690adb11199 6 int main()
Gottfried 0:8690adb11199 7 {
Gottfried 0:8690adb11199 8 // Tx, Rx
Gottfried 0:8690adb11199 9 // Arduino Header
Gottfried 0:8690adb11199 10 DMX dmx(D3, D4); //(PC_2, PA_2)
Gottfried 1:a885240933b7 11
Gottfried 1:a885240933b7 12 dmx.start();
Gottfried 1:a885240933b7 13
Gottfried 0:8690adb11199 14 while(1)
Gottfried 0:8690adb11199 15 {
Gottfried 0:8690adb11199 16 myled = 1; // LED is ON
Gottfried 0:8690adb11199 17 wait(0.2); // 200 ms
Gottfried 0:8690adb11199 18 myled = 0; // LED is OFF
Gottfried 0:8690adb11199 19 wait(1.0); // 1 sec
Gottfried 1:a885240933b7 20 dmx.put(0, (char)255);
Gottfried 1:a885240933b7 21 int i = dmx.get(0);
Gottfried 0:8690adb11199 22 }
Gottfried 0:8690adb11199 23 }