Advertisement
Guest User

Untitled

a guest
Mar 12th, 2014
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.17 KB | None | 0 0
  1. /* Welcome to DmxSimple. This library allows you to control DMX stage and
  2. ** architectural lighting and visual effects easily from Arduino. DmxSimple
  3. ** is compatible with the Tinker.it! DMX shield and all known DIY Arduino
  4. ** DMX control circuits.
  5. **
  6. ** DmxSimple is available from: http://code.google.com/p/tinkerit/
  7. ** Help and support: http://groups.google.com/group/dmxsimple       */
  8.  
  9. /* To use DmxSimple, you will need the following line. Arduino will
  10. ** auto-insert it if you select Sketch > Import Library > DmxSimple. */
  11.  
  12. #include <DmxSimple.h>
  13.  
  14. void setup() {
  15.   /* The most common pin for DMX output is pin 3, which DmxSimple
  16.   ** uses by default. If you need to change that, do it here. */
  17.   //DmxSimple.usePin(11);
  18.  
  19.   /* DMX devices typically need to receive a complete set of channels
  20.   ** even if you only need to adjust the first channel. You can
  21.   ** easily change the number of channels sent here. If you don't
  22.   ** do this, DmxSimple will set the maximum channel number to the
  23.   ** highest channel you DmxSimple.write() to. */
  24.   DmxSimple.maxChannel(512);
  25. }
  26.  
  27. void loop() {
  28.   int ch;
  29.   for (ch = 0; ch < 512; ++ch){
  30.     DmxSimple.write(ch, 100);
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement