Étape 5: Le bouclier DMX
Matériel :
J’ai utilisé un bouclier DMX - modèle : CTC-DRA-10-1, faible coût, non isolé qui peut être acheté sur Ebay pour environ $15,00
Voir photo pour bouclier DMX.
Logiciel :
J’ai utilisé la bibliothèque de DMX Conceptinetics pour gérer le capitaine DMX (envoi). Plus d’informations, consultez Conceptinetics DMX bibliothèque et ce Blog bouclier DMX . La bibliothèque est très simple à utiliser. Initialiser et utiliser 2 commandes différentes pour envoyer un seul canal ou un bouquet de chaînes.
Voici un extrait de code montrant comment initial et utiliser la bibliothèque de DMX :
#define DMX_MASTER_CHANNELS 512<br> // Pin number to change read or write mode on the shield #define RXEN_PIN 2<br> // Configure a DMX master controller, the master controller // will use the RXEN_PIN to control its write operation // on the bus DMX_Master dmx_master ( DMX_MASTER_CHANNELS, RXEN_PIN ); void setup () { dmx_master.enable (); } void sendDMX(int start, int end, unsigned char intensity) { if(start == end) { dmx_master.setChannelValue(start, intensity); } else { dmx_master.setChannelRange(start, end, intensity ); } }