adrilight icon indicating copy to clipboard operation
adrilight copied to clipboard

NodeMCU ESP8266 Lights not being outputted from the Adrilight program

Open T-NhanNguyen opened this issue 5 years ago • 22 comments

I'm used the Node MCU ESP8266 microcontroller, and there were some tweaking that needed to be done to get FastLED to work for the Arduino ide, specifcally, including 1 line of code from here: https://github.com/FastLED/FastLED/wiki/ESP8266-notes

So, I've gotten the Adrilight.ino Code to upload and work with my MCU, however I can't seem to get the serial communication to work. I've set the proper amount of LED count, port value, and even tried older versions, Nothing is working for me. I think the problem is becuase within my preview, the LED bars are black rather than showing the appropriate colors.

image

Using Windows 10 version 1909

T-NhanNguyen avatar May 18 '20 06:05 T-NhanNguyen

Adrilight sees the screen because the preview is working but you are right. The actual spots are black. You should check the black threshold in the lighting mode tab.

fabsenet avatar May 18 '20 06:05 fabsenet

The black threshold doesn't change the outcome, and one thing I forgot to mention is that, when turning on "Enable sending" after uploading the ino code, the program doesn't change the LED to black, it fix it to the last color that each led is on, of the rainbow.

I've been reading over the old reports of similar problems about this same issue, but the solutions for those reports doesn't seem to work (Old version required turning off overlay, and using bambilight).

T-NhanNguyen avatar May 18 '20 06:05 T-NhanNguyen

I have a very similar problem, using the ESP8266 NodeMCU. When I load the arduino code after completion the entire strip lights up with the rainbow effect for a few seconds and then fades. When I launch Adrilight nothing seems to be sent to the arduino, even if I try to send random colours, nothing appears.

TheLilGrant avatar May 19 '20 01:05 TheLilGrant

I think, it's defintiely something with the program, rather than the MCU we're using. I assumed that it was a serial communication problem, so I did some research, and found this problem that also occurred within my MCU with the serial communication. https://github.com/esp8266/Arduino/issues/4005

I know that for this specific application, you're not suppose to change the baud rate to anything below 1 million, but for the heck of it, I've tried it out and that wasn't the fix.

Something might be blocking the app from reading reading the section color values

T-NhanNguyen avatar May 19 '20 02:05 T-NhanNguyen

In my case, the exact same setup with a FastLED example program works perfectly, its only Adrilight that does not work. When I try to communicate with the board while Adrilight is running I get blocked on the port, so I assume Adrilight is at least trying to communicate. The preview portion shows the proper colours, but all lights are off.

TheLilGrant avatar May 19 '20 02:05 TheLilGrant

if you disable the "Enable sending" you can free up the port without have to exit the program. That's weird though, you're the tiles are showing proper colors but it's not displaying the lights? What version of the build are you using, and what antivirus are you using? tried disabling my avast to see if that was the cause for improper preview, but that wasn't a fix

T-NhanNguyen avatar May 19 '20 02:05 T-NhanNguyen

I take that back, I've purged all instances of adrilight from my computer and downloaded the newest version. The preview is working properly now, but the communication isn't working still.

I've attempted to switch my board out with the nano, and that's a no go either.

T-NhanNguyen avatar May 19 '20 03:05 T-NhanNguyen

Check the number of leds in adrilight setup and in the arduino code. They must match perfectly!

fabsenet avatar May 19 '20 05:05 fabsenet

I verified that the number of LEDs is the same in adrilight and the arduino code. I've tried a smaller number of LEDS for testing and modified all the settings I can think of but nothing causes any of the LEDs to turn on. Any other ideas?

TheLilGrant avatar May 19 '20 13:05 TheLilGrant

3 things need to be verified number of leds in the arduino code= (numled_x+numled_y -2)x2 With Raw pin order, D1 pin(node mcu) is pin 5 if you're not using wifi then turn the wifi function off, or you will get the wdt reset

Kaitoukid93 avatar May 19 '20 13:05 Kaitoukid93

think about the matrix led, 4 led at 4 corner is used twice so actual leds number on the strip(arduino code) is less than on the software

Kaitoukid93 avatar May 19 '20 13:05 Kaitoukid93

Is the WIFI setting defined within the "Erase setting" of the tool's tab? D1 seems to work for uploading the lights, are you suggesting to use pin 5 instead?

T-NhanNguyen avatar May 19 '20 14:05 T-NhanNguyen

you should google it for "how to turn off wifi on esp8266" it's a line of code inside setup() you should try to upload the example code from Fastled( color palette) to make sure D1 is working ( remember to use with or without raw pin order to check) if the fastled and the pin work together, you should see the rainbow color moving on the led strip after the adrilight code uploaded next, turn on serial connection on adrilight app, if the led freeze then turn off or just freeze, the led number is not match

Kaitoukid93 avatar May 19 '20 14:05 Kaitoukid93

That's the problem though, that's what fatsenet mentioned earlier, and that's what me and TheLilGrant is having problems with. The led are stuck even with matching count.

T-NhanNguyen avatar May 19 '20 14:05 T-NhanNguyen

did you even try the serial communication?? because CP2102 has some problems with unpopular baud rates( 1000000 )

Kaitoukid93 avatar May 19 '20 14:05 Kaitoukid93

Yes, if you've read earlier post, I've attempted with lower baud rate than the suggested baud rate of 1 million.

"I know that for this specific application, you're not suppose to change the baud rate to anything below 1 million, but for the heck of it, I've tried it out and that wasn't the fix."

T-NhanNguyen avatar May 19 '20 14:05 T-NhanNguyen

ok sow now data pin work with fastled example (D1 or 5) : checked Numleds ( example 30 on arduino equal to 34 on adrilight led setup): checked Serial communication ( example Ascii table print using arduino serial monitor with Serial.begin(1000000) and baudrate setting 1000000) : checked if you can confirm all 3 things above checked and the led still freeze then I have nothing to do here

Kaitoukid93 avatar May 19 '20 15:05 Kaitoukid93

The windows part has a separate widget displaying the expected count if less. The matrix thing with minus2 is gone.

Please tell us, how many leds each of your strips has.

Also provide the Screenshot of adrilight and the first few lines of the adrilight ino

Kaitoukid93 [email protected] schrieb am Di., 19. Mai 2020, 17:01:

ok sow now data pin work with fastled example (D1 or 5) : checked Numleds ( example 30 on arduino equal to 34 on adrilight led setup): checked Serial communication ( example Ascii table print using arduino serial monitor with Serial.begin(1000000) and baudrate setting 1000000) : checked if you can confirm all 3 things above checked and the led still freeze then I have nothing to do here

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fabsenet/adrilight/issues/102#issuecomment-630878988, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPYKKLNDHEA6L5JDVYFHRTRSKNMFANCNFSM4NDY2SPA .

fabsenet avatar May 19 '20 15:05 fabsenet

The windows part has a separate widget displaying the expected count if less. The matrix thing with minus2 is gone. Please tell us, how many leds each of your strips has. Also provide the Screenshot of adrilight and the first few lines of the adrilight ino Kaitoukid93 [email protected] schrieb am Di., 19. Mai 2020, 17:01: ok sow now data pin work with fastled example (D1 or 5) : checked Numleds ( example 30 on arduino equal to 34 on adrilight led setup): checked Serial communication ( example Ascii table print using arduino serial monitor with Serial.begin(1000000) and baudrate setting 1000000) : checked if you can confirm all 3 things above checked and the led still freeze then I have nothing to do here — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#102 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPYKKLNDHEA6L5JDVYFHRTRSKNMFANCNFSM4NDY2SPA .

if the LED number is matched so the only reason that I can think about is the serial communication

Kaitoukid93 avatar May 19 '20 17:05 Kaitoukid93

So in my case, I have a 288 LED long strip, 2 meters in length, using the WS2815 IC. I have tested with a smaller number of LEDs, as low as 10, and still have the same issues. Essentially, I can load any FastLED animation, even very complex ones at max brightness on the full strip with no issues at all. When I upload the adrilight ino, the rainbow animation displays on the strip. As soon as I launch Adrilight on my PC, the rainbow animation immediately stops moving, and sticks at that state. If I try to send random data or screen data, nothing changes on the strip.

Also when I close the Adrilight application the strip fades to off.

Capture Capture2

TheLilGrant avatar May 19 '20 19:05 TheLilGrant

I needed the physical led strip page from adrilight as a Screenshot.

TheLilGrant [email protected] schrieb am Di., 19. Mai 2020, 21:46:

So in my case, I have a 288 LED long strip, 2 meters in length, using the WS2815 IC. I have tested with a smaller number of LEDs, as low as 10, and still have the same issues. Essentially, I can load any FastLED animation, even very complex ones at max brightness on the full strip with no issues at all. When I upload the adrilight ino, the rainbow animation displays on the strip. As soon as I launch Adrilight on my PC, the rainbow animation immediately stops moving, and sticks at that state. If I try to send random data or screen data, nothing changes on the strip.

[image: Capture] https://user-images.githubusercontent.com/60147677/82370997-748b4200-99e7-11ea-9dc5-c6a13ab67492.PNG [image: Capture2] https://user-images.githubusercontent.com/60147677/82371003-77863280-99e7-11ea-8640-48016b2e3af8.PNG

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fabsenet/adrilight/issues/102#issuecomment-631042966, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPYKKNMQTDIQLKW3LFTPNTRSLO2ZANCNFSM4NDY2SPA .

fabsenet avatar May 20 '20 07:05 fabsenet

It's 2022, & I'm still facing the same issue of having static rainbow when I click on sending active

OS - Windows 10 (64bit) MCU - NodeMCU esp8266

Neilblaze avatar Jul 29 '22 13:07 Neilblaze