Vinz68 / NeoPixel-Stair

Stair LedLights, using NeoPixel Ledstrips and an Arduino
9 stars 1 forks source link

Limited number of Neopixels #10

Closed mileu closed 1 year ago

mileu commented 2 years ago

Hello, Is it possible to modify the code to work on a ESP8266 based device,like Wemos D1 mini or Lolin ? For me it is impossible to run more that ~310 LEDs and for sure is the well known limitations that involve RAM. Every LED needs 3 bytes of RAM so it looks like the whole setup is limited to 300+ LEDs. That leads to a platform with more RAM available and I thought an ESP8266 will be good for this purpose... Can it be done from your point of view ? I did compiled it in Arduino IDE,flashed it on Wemos D1 mini but it will do nothing. Thank you.

Vinz68 commented 2 years ago

The ledstrip I used (WS2812) and other ledstrips can also be used on an ESP8266. There examples on internet ; just google on ESP8266 Ledstrip. This might be something of your interest: https://www.instructables.com/ESP8266-controlling-Neopixel-LEDs-using-Arduino-ID/ If you have 300 leds, you need a better power supply with more amperes.

Good luck ; and plz let me know if you are successfull (always nice to hear from other DIY projects).

mileu commented 2 years ago

Hi Vinz, Thank you very much for the heads-up,it was only a bad pin mapping.Now everything is working as it should. So,I had to modify the following: #define PIN 5 // Pin used for the NeoPixels will become #define PIN 14 // Pin used for the NeoPixels on WeMos board marked as D5 int alarmPinTop = 10; // PIR at the top of the stairs will become int alarmPinTop = 13; // PIR at the top of the stairs on WeMos board marked as D7 int alarmPinBottom = 11; // PIR at the bottom of the stairs will become int alarmPinBottom = 15; // PIR at the bottom of the stairs on WeMos board marked as D8 Tested with 600 LEDs WS2812B and everything is fine. Will do more testing and adjustment and see how it will behave. For everyone how will test with ESP8266 based devices,keep in mind that GPIOs on this device are 3.3V tolerant,so connect the LDR on 3.3V and add any kind of level shifting between ESP8266 and Neopixel strip.The PIR sensors (HC-SR501) are 3.3V logic so there will be no problem with them. Thank you very much for your work. Good luck to you !

Vinz68 commented 2 years ago

Hi Mileu, Nice 600 Leds !!. Good to hear that you got everything working (and good you mentioned the 3.3 Volts as a warning for other developers). If you happen to keep your code of the ESP8266 on github then let me know. I would be happy to add a link to your repository from my repository/description for other users. Good luck to you too & Happy coding ;)