I wrote this code, I compile and updload the code to my arduino with no error, but when I try, noting happens. I tried with a GrandMa2 console connected to input and it doesn't received nothing. Also tried directly to the splitter and dimmers but nothing. what I'm doing wrong? What can I do to make it work?
/ A_CT LIGHTS CONTROL /
/OLED/
//#include <adafruit_gfx.h>
//#include <adafruit_ssd1306.h>
//#include <spi.h></spi.h></adafruit_ssd1306.h></adafruit_gfx.h>
U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);
//#include <freesans18pt7b></freesans18pt7b>
//#define SCREEN_WIDTH 128 // OLED display width, in pixels
//#define SCREEN_HEIGHT 32 // OLED display height, in pixels
//#define OLED_RESET 4
//Adafruit_SSD1306 display(OLED_RESET);
DMX_Master dmx_master ( DMX_MASTER_CHANNELS, RXEN_PIN );
OneButton button1(3, true);
OneButton button2(4, true);
OneButton button3(5, true);
OneButton button4(6, true);
OneButton button5(7, true);
OneButton button6(8, true);
OneButton button7(9, true);
OneButton button8(10, true);
OneButton button9(11, true);
void u8g2_prepare() {
u8g2.setFont(u8g2_font_6x10_tf);
u8g2.setFontRefHeightExtendedText();
u8g2.setDrawColor(1);
u8g2.setFontPosTop();
u8g2.setFontDirection(0);
}
void setup() {
u8g2.begin();
button1.attachClick(click1);
button2.attachClick(click2);
button3.attachClick(click3);
button4.attachClick(click4);
button5.attachClick(click5);
button6.attachClick(click6);
button7.attachClick(click7);
button8.attachClick(click8);
button9.attachClick(click9);
dmx_master.enable ();
}
void loop() {
button1.tick();
button2.tick();
button3.tick();
button4.tick();
button5.tick();
button6.tick();
button7.tick();
button8.tick();
button9.tick();
delay(10);
u8g2.setFont(u8g2_font_8x13B_mf);
u8g2.drawStr(97,10,"A_CT");
u8g2.sendBuffer();
}
void click1 () {
u8g2.setFont(u8g2_font_8x13_mf);
u8g2.drawStr(0,9,"Sala 0%");
u8g2.sendBuffer();
dmx_master.setChannelRange ( 201, 208, 0 );
dmx_master.setChannelValue (211, 51);
dmx_master.setChannelValue (212, 51);
}
void click2 () {
u8g2.setFont(u8g2_font_8x13_mf);
u8g2.drawStr(0,9,"Sala 20%");
u8g2.sendBuffer();
dmx_master.setChannelRange ( 201, 208, 51 );
dmx_master.setChannelValue (211, 51);
dmx_master.setChannelValue (212, 51);
}
void click3 () {
u8g2.setFont(u8g2_font_8x13_mf);
u8g2.drawStr(0,9,"Sala 50%");
u8g2.sendBuffer();
dmx_master.setChannelRange ( 201, 208, 127 );
dmx_master.setChannelValue (211, 127);
dmx_master.setChannelValue (212, 127);
}
void click4 () {
u8g2.setFont(u8g2_font_8x13_mf);
u8g2.drawStr(0,9,"Sala 75%");
u8g2.sendBuffer();
dmx_master.setChannelRange ( 201, 208, 192 );
dmx_master.setChannelValue (211, 192);
dmx_master.setChannelValue (212, 192);
}
void click5 () {
u8g2.setFont(u8g2_font_8x13_mf);
u8g2.drawStr(0,9,"Sala 100%");
u8g2.sendBuffer();
dmx_master.setChannelRange ( 201, 208, 255 );
dmx_master.setChannelValue (211, 255);
dmx_master.setChannelValue (212, 255);
}
void click6 () {
u8g2.setFont(u8g2_font_8x13_mf);
u8g2.drawStr(0,32,"UV 0%");
u8g2.sendBuffer();
dmx_master.setChannelRange ( 401, 412, 0 );
}
void click7 () {
u8g2.setFont(u8g2_font_8x13_mf);
u8g2.drawStr(0,32,"UV 25%");
u8g2.sendBuffer();
dmx_master.setChannelRange ( 401, 412, 64 );
}
void click8 () {
u8g2.setFont(u8g2_font_8x13_mf);
u8g2.drawStr(0,20,"Concha 0%");
u8g2.sendBuffer();
dmx_master.setChannelRange ( 301, 373, 0 );
}
void click9 () {
u8g2.setFont(u8g2_font_8x13_mf);
u8g2.drawStr(0,20,"Concha 100%");
u8g2.sendBuffer();
dmx_master.setChannelRange ( 301, 373, 255 );
}
DMX SHIELD CTC-DRA-10-R2
ARDUINO BOARD Wemos® UNO+WiFi R3 ATmega328P+ESP8266 32Mb Memory