Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <DmxReceiver.h>
- #include <FastLED.h>
- #include <TimerOne.h>
- DmxReceiver dmx;
- IntervalTimer dmxTimer;
- void pdmx()
- {
- print_dmx_buffer();
- }
- void dmxTimerISR(void)
- {
- dmx.bufferService();
- }
- void setup()
- {
- /* USB serial */
- Serial.begin(115200);
- /* DMX */
- Timer1.initialize(10000000);
- Timer1.attachInterrupt(pdmx);
- dmx.begin();
- /* Use a timer to service DMX buffers every 1ms */
- dmxTimer.begin(dmxTimerISR, 1000);
- LEDS.setBrightness(max_bright);
- //LEDS.addLeds<LPD8806, BRG>(leds, LED_COUNT);
- LEDS.addLeds<WS2812B, 18, GRB>(leds, LED_COUNT);
- one_color_all(0, 0, 0);
- LEDS.show();
- }
Advertisement
Add Comment
Please, Sign In to add comment