I2C WS2812b ATtiny85

Hello,
I'm currently working on a project with a ws2812b led strip that represents the amount of CO2 in the air.
The CO2 is measured by a sensor that is attached to a Raspberry Pi.
To control the led strip, I would like to use an ATtiny85 which is connected to the Raspberry Pi trough an I2C bus.
But when I merge the I2C and the WS2812b library I can't communicate with the Attiny anymore on the bus.

Do you guys know any good library that combines I2C and the WS2812b protocol?

The attached file is what I've tried until now.
Note that some of the variables are named in dutch, but you will probably get the general concept of what I'm trying to achieve.

Thank you in advance, Sander

ATtiny_Ledstrip.ino (2.93 KB)

Hello.

The I2C library and FastLed library (or whichever ws2812b library you chose). The issue is you cannot typical just paste two example code snippets together and expect them to work.

You have posted in the wrong place, I suggest asking a moderator to help you move it to “programming questions”.

Also, rather than making everyone who wants to help download and open your program you should paste the code in code tags directly to the forums.

Here is a good guide as to how these forum works:

https://forum.arduino.cc/index.php?topic=148850.0

It probably belongs in Project Guidance, actually.

I recall the old ATtiny85 doesn't have hardware I2C so that and the FastLED library will fight over resources. They may even want to use the same timer, as both I2C and WS2812B communication is time sensitive.

Start by making this work on a regular Arduino (the Pro Mini isn't that much bigger and about the same cost as an ATtiny85 anyway) first. Then try to get it onto an ATtiny.