Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed DMX TextLCD mbed-rtos
ArtNet.h@15:b0efafcfbb03, 2016-03-08 (annotated)
- Committer:
- Ayrton_L
- Date:
- Tue Mar 08 21:30:42 2016 +0000
- Revision:
- 15:b0efafcfbb03
- Child:
- 16:3cc108681a53
Adjusted Banner; ArtNet started (IP, Socket ...); Included LWIP, RTOS
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ayrton_L | 15:b0efafcfbb03 | 1 | #ifndef ARTNET_H |
Ayrton_L | 15:b0efafcfbb03 | 2 | #define ARTNET_H |
Ayrton_L | 15:b0efafcfbb03 | 3 | |
Ayrton_L | 15:b0efafcfbb03 | 4 | #include "mbed.h" |
Ayrton_L | 15:b0efafcfbb03 | 5 | #include "EthernetInterface.h" |
Ayrton_L | 15:b0efafcfbb03 | 6 | |
Ayrton_L | 15:b0efafcfbb03 | 7 | #define ArtNetPoort 6454 |
Ayrton_L | 15:b0efafcfbb03 | 8 | |
Ayrton_L | 15:b0efafcfbb03 | 9 | static const char* mbedIp = "2.0.0.100"; //IP |
Ayrton_L | 15:b0efafcfbb03 | 10 | static const char* mbedMask = "255.0.0.0"; // Mask |
Ayrton_L | 15:b0efafcfbb03 | 11 | static const char* mbedGateway = "2.0.0.1"; //Gateway |
Ayrton_L | 15:b0efafcfbb03 | 12 | |
Ayrton_L | 15:b0efafcfbb03 | 13 | void V_ArtNet(); |
Ayrton_L | 15:b0efafcfbb03 | 14 | |
Ayrton_L | 15:b0efafcfbb03 | 15 | void V_ArtNet() |
Ayrton_L | 15:b0efafcfbb03 | 16 | { |
Ayrton_L | 15:b0efafcfbb03 | 17 | EthernetInterface eth; |
Ayrton_L | 15:b0efafcfbb03 | 18 | eth.init(mbedIp, mbedMask, mbedGateway); |
Ayrton_L | 15:b0efafcfbb03 | 19 | eth.connect(); |
Ayrton_L | 15:b0efafcfbb03 | 20 | UDPSocket ArtNetSocket; |
Ayrton_L | 15:b0efafcfbb03 | 21 | ArtNetSocket.bind(ArtNetPoort); |
Ayrton_L | 15:b0efafcfbb03 | 22 | |
Ayrton_L | 15:b0efafcfbb03 | 23 | Endpoint Client; |
Ayrton_L | 15:b0efafcfbb03 | 24 | |
Ayrton_L | 15:b0efafcfbb03 | 25 | } |
Ayrton_L | 15:b0efafcfbb03 | 26 | |
Ayrton_L | 15:b0efafcfbb03 | 27 | |
Ayrton_L | 15:b0efafcfbb03 | 28 | #endif |
Ayrton_L | 15:b0efafcfbb03 | 29 |