SparkFun Forums 

Where electronics enthusiasts find answers.

Hi everyone,
Apologies in advance if I have posted this question in the wrong section of the forum.

I am trying to get an ESP8266 (SparkFun ESP8266 Thing) to do something similar to whats happening in this, 2015 - SparkFun Video, ...

They're basically connecting addressable LEDs (WS2812b) to the weather data and allowing for control with the Blynk App.
However the codes provided are for:

- a Pro Mini . ... ontrol.ino

- SparkFun ESP8266 Thing . ... dCloud.ino

I am trying to collapse the two codes provided here, and only use the SparkFun ESP8266 Thing, because I only need to control around 20 LEDS to basically do the same things in the video above. I am not a programmer, so I would really appreciate it if someone could help me out, I am not sure if its doable or not and, in case it is, can someone point me out as how it could be done?

Thank you
Hi Buzz,

The trouble with using a single microcontroller here is not so much based on the number of LEDs but the actual memory space the code for both polling the weather data from the web combined with the LED outputs exceeds the space you have on an ESP8266. It also helps keep the code simpler so that you're just sending serial output from the ESP8266 and the Pro Mini is listening to that and changing the LEDs accordingly. Also, this allows you to control the LEDs directly from your microcontroller since they run at 5V logic and the ESP8266 runs at 3.3V logic. If you used a single ESP8266 Thing, you would need to level shift your data line for the LEDs. If you are not familiar with logic levels, we have a tutorial discussing that topic in-depth here.

Combining the two codes onto a single microcontroller is technically possible with a more powerful microcontroller but you will need to modify the code quite a bit to get it all running happily on a single microcontroller. Something like the SparkFun Thing Plus - ESP32 WROOM could work as a single microcontroller but we have not tested to be certain. Also, you would need to level shift the LED control line since the ESP32 also runs at 3.3V.

The toughest part of adapting the entire project to a single microcontroller is going to be modifying the example code and I am afraid SparkFun Technical Support cannot assist with custom code consulting so we will not be able to help write that code for you. Other users here or on the ESP32 Forum (assuming you choose the Thing Plus ESP32) may be able to help. Alternatively, you could look for a similar project on the web that uses a single controller to both poll weather data and control LEDs.

I hope this helps you decide on the right parts for this project. If you have any other questions about the SparkFun parts listed here or in that Cloud Cloud tutorial, let us know and we would be happy to help as much as we can.