Comments on: MicroPython: WS2812B Addressable RGB LEDs with ESP32 and ESP8266 https://randomnerdtutorials.com/micropython-ws2812b-addressable-rgb-leds-neopixel-esp32-esp8266/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Sat, 06 Nov 2021 17:26:59 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Anthony Ferlazzo https://randomnerdtutorials.com/micropython-ws2812b-addressable-rgb-leds-neopixel-esp32-esp8266/#comment-694753 Sat, 06 Nov 2021 17:26:59 +0000 https://randomnerdtutorials.com/?p=81128#comment-694753 In reply to Anthony Ferlazzo.

The problem was completely my fault. The UART to Serial driver was installed when I was using Arduino C++ and it appears that after re-flashing the ESP8266 with Micro Python I should have reinstalled the driver. Once I did that everything began working fine.

]]>
By: Anthony Ferlazzo https://randomnerdtutorials.com/micropython-ws2812b-addressable-rgb-leds-neopixel-esp32-esp8266/#comment-694405 Fri, 05 Nov 2021 16:14:58 +0000 https://randomnerdtutorials.com/?p=81128#comment-694405 In reply to Anthony Ferlazzo.

After thinking about this for a while I decided to try reinstalling the USB-to-Serial driver. It was installed when I was using the Arduino IDE and C++. That seems to have worked, but we’ll see.

The WS2812B is not lighting up. To help me debug the issue, rather than use the WS2812 LED strip I used the onboard LEDs.

#for Microcontroller NodeMCU 12E ESP8266 Board, the version I have that includes wifi capability

#The NodeMCU has two on-board LEDs
#The first LED comes with the ESP-12E Module and is connected to GPIO 2 of ESP8266
#The second LED is on the break-out board (near the CP2102 IC) and is connected to GPIO 16

#The ESP8266 uses ‘inverse logic’ meaning that they turn on when the pins are 0 and turn
#off when the pins are 1

import time
from machine import Pin
led1=Pin(2,Pin.OUT) #create the first LED object on pin 2 and set it to output
led2=Pin(16,Pin.OUT) #create the second LED object on pin 16 and set to output
i = 0

#Alternate the blinking of the LEDs every half second 40 times
while i < 40:
led1.value(1) #turn off
led2.value(0) #turn on
time.sleep(0.5)
led1.value(0) #turn on
led2.value(1) #turn off
time.sleep(0.5)
led1.value(1) #turn off
led2.value(0) #turn on

i = i + 1

Since I have over 40 LEDs in the strip I’m going to try using an external 5 volt power supply.

]]>
By: Anthony Ferlazzo https://randomnerdtutorials.com/micropython-ws2812b-addressable-rgb-leds-neopixel-esp32-esp8266/#comment-693928 Thu, 04 Nov 2021 14:41:31 +0000 https://randomnerdtutorials.com/?p=81128#comment-693928 The LEDs do not light.

The Shell displays the error message:

Unable to connect to COM5: could not open port ‘COM5’: PermissionError(13, ‘Access is denied.’, None, 5)

If you have serial connection to the device from another program, then disconnect it there first.

Device Manager reports a COM5 at 11500 kbps, I lowered it to 9600 in Thonny

]]>
By: Sara Santos https://randomnerdtutorials.com/micropython-ws2812b-addressable-rgb-leds-neopixel-esp32-esp8266/#comment-665258 Wed, 01 Sep 2021 09:30:49 +0000 https://randomnerdtutorials.com/?p=81128#comment-665258 In reply to Amedo1.

That’s great!

]]>
By: Amedo1 https://randomnerdtutorials.com/micropython-ws2812b-addressable-rgb-leds-neopixel-esp32-esp8266/#comment-665147 Wed, 01 Sep 2021 04:00:33 +0000 https://randomnerdtutorials.com/?p=81128#comment-665147 Thanks Santos and Sara, I made this addressable LED strip montage and it works fine (ESP32 with an 8 LED strip), and everything is very well explained.

]]>
By: Attila https://randomnerdtutorials.com/micropython-ws2812b-addressable-rgb-leds-neopixel-esp32-esp8266/#comment-589748 Wed, 14 Apr 2021 12:24:30 +0000 https://randomnerdtutorials.com/?p=81128#comment-589748 In reply to Mike.

Hi Mike !

I’m glad it works now. Was it a software bug or something with the hardware?

This tutorial relies on the chance that the LEDs will work with 3.3V logic level (which is true for most of the time), but adding more and
more LEDs will make it more and more marginal. I would still recommend you to use a level shifter between the ESP and the LEDs.

Attila

]]>
By: Mike https://randomnerdtutorials.com/micropython-ws2812b-addressable-rgb-leds-neopixel-esp32-esp8266/#comment-589739 Wed, 14 Apr 2021 12:06:52 +0000 https://randomnerdtutorials.com/?p=81128#comment-589739 In reply to Attila.

Thanks Attila, really appreciate your reply, I have found my mistake. Right now, it’s working.

THANKS!
miKE

]]>
By: Mike https://randomnerdtutorials.com/micropython-ws2812b-addressable-rgb-leds-neopixel-esp32-esp8266/#comment-589733 Wed, 14 Apr 2021 11:53:43 +0000 https://randomnerdtutorials.com/?p=81128#comment-589733 In reply to Attila.

If it’s possible that I can send you my work through your email? Mine is 935431582@qq.com.

Regards,
Mike

]]>
By: Mike https://randomnerdtutorials.com/micropython-ws2812b-addressable-rgb-leds-neopixel-esp32-esp8266/#comment-589731 Wed, 14 Apr 2021 11:51:54 +0000 https://randomnerdtutorials.com/?p=81128#comment-589731 In reply to Attila.

Hi Attila!
Thanks your reply.
I didn’t use the same project as the demostration and I cut ”button part”, only trying to change the color for my own projects. With the esp32, I used the GPIO 26 as my Pin.OUT, and I added the power supply part–5v. Then I connected those together for having the same Positive and Negative poles.

Right now, I copied all the stuff demostrated by the tutorial –”https://raw.githubusercontent.com/RuiSantosdotme/Random-Nerd-Tutorials/master/Projects/ESP-MicroPython/esp32_esp8266_ws2812b.py”.

So in order to be the same page with my own one, I just changed the last orders into blow:
“while True:
clear()
rainbow_cycle(200)”

But the result is still negative.

]]>
By: Attila https://randomnerdtutorials.com/micropython-ws2812b-addressable-rgb-leds-neopixel-esp32-esp8266/#comment-589728 Wed, 14 Apr 2021 11:42:37 +0000 https://randomnerdtutorials.com/?p=81128#comment-589728 In reply to Mike.

Hi Mike!

What’s your solution for the level shift? I have an exact same project (ESP+addressable LEDs) and it’s working fine.
I am using an N-channel BS170 mosfet to shift from 3.3 to 5V. You have to have a pullup resistor to 5V on the LEDs data pin, and then pulling it down to GND with the mosfet.

]]>