Hello guys, Is it possible to use an LED strip on the I2C bus. Currently, I am controlling the output on the LED strip based on gyroscope values and a digital output pin. Unfortunately, project requirement is to use only 4 wires so the limitation is to use I2C bus.
there are many ways to control an LED strip with only 4 wires. I2C, SPI, etc. What type of LED strip to you have? If it is some sort of W2812 RGB strip, you can do that with 3 wires. Most "strips" do not come standard with an i2c interface.
NeoPixels use a single data wire but strict timing requirements, thus three wires - 5V, ground, data. Nothing whatsoever to do with I2C.
Do you mean you want so share a data wire between I2C and the NeoPixels? The intermittent NeoPixel data stream would probably not trouble the I2C but the other way around would likely be a problem.
Just use different pins - two for I2C and one for NeoPixels. If your "project requirement is to use only 4 wires" including power and ground then you clearly need to just change the "project requirement"!
blh64:
there are many ways to control an LED strip with only 4 wires. I2C, SPI, etc. What type of LED strip to you have? If it is some sort of W2812 RGB strip, you can do that with 3 wires. Most "strips" do not come standard with an i2c interface.
Can you suggest some good strip where LEDs are not far away and use the I2C interface? Previously I used WS 2812B with 3 pins. Everything worked fine but now in the upgrade, I don't have the scope to use any digital pin. I either need an LED strip with i2c interface or some small driver connecting one side to the LED strip and other on i2c bus. unfortunately, the SPI bus is also not a feasible option.
Paul__B:
NeoPixels use a single data wire but strict timing requirements, thus three wires - 5V, ground, data. Nothing whatsoever to do with I2C.
Of course, that is the reason why I posted a query.
Paul__B:
Just use different pins - two for I2C and one for NeoPixels. If your "project requirement is to use only 4 wires" including power and ground then you clearly need to just change the "project requirement"!
IF you must use I2C, you most likely will need to have your LEDs paired up with a ATTiny or Micro or nano and then connect that device to your main arudino and communicate over i2c. Once the receiving arduino gets all the data, then it clocks it out to the LEDs.
Is that an option? LEDs don't come with i2c interfaces
blh64:
IF you must use I2C, you most likely will need to have your LEDs paired up with a ATTiny or Micro or nano and then connect that device to your main arudino and communicate over i2c. Once the receiving arduino gets all the data, then it clocks it out to the LEDs.
Is that an option? LEDs don't come with i2c interfaces
yes, I thought of doing this, but was worried about the delay in processing speed. but seems the last option!
Can you please tell us your electronics, programming, Arduino, hardware experience?
Tom....
This is for a startup I am working on. I am AI specialist, trying to develop something and there are some constraints from the funding partner so that is the reason only 4 wires can be used.
shaniot2020:
Hi Tom,
I am using Nano BLE sense, I do have I/o pins but due to some project limitations, I have only 4 wires. +,-,scl,sda basically i2c bus!
So what is wrong with three wires?
If you have no plans for I2C, use one of the pins.
Tom....
TomGeorge:
So what is wrong with three wires?
If you have no plans for I2C, use one of the pins.
Tom....
haha, well I told you its not some school project to just play around with led. I have many different stuff working all together on i2c bus. I want to add something more (in this case, led strip) but, for the connection, I only have i2c bus, therefore, it is decided that I will use small trinket mini or something and use it as a slave device and led strip will connect to it. Hope I cleared it this time. Thanks!