Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Data Pin ESP8266 #1017

Open
jaspervanisterdael opened this issue May 26, 2024 · 1 comment
Open

Change Data Pin ESP8266 #1017

jaspervanisterdael opened this issue May 26, 2024 · 1 comment

Comments

@jaspervanisterdael
Copy link

Feature does not already exist?

I searched and did not find an existing feature request

Summarize feature

Dear community,

I'm trying to use the D5 port instead of the RX port on my ESP8266. I changed the .ino file, but the modified script isn't working. I'm able to connect to my wifi and configure the lightstrip, but actually changing the colors isn't possible. Any tips/suggestions?

I have added/changed the following code:

#define DATA_PIN 5 // Define the pin number for the data

`void ChangeNeoPixels(uint16_t newCount) // this set the number of leds of the strip based on web configuration
{
  if (strip != NULL) {
    delete strip; // delete the previous dynamically created strip
  }
  // strip = new NeoPixelBus<NeoBgrFeature, Neo800KbpsMethod>(newCount); // and recreate with new count
  strip = new NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod>(newCount, DATA_PIN); // and recreate with new count
  //strip = new NeoPixelBus<NeoBrgFeature, Neo800KbpsMethod>(newCount); // and recreate with new count
  strip->Begin();
}

void setup() {
  Serial.begin(115200);
  Serial.println();
  delay(1000);

  pinMode(POWER_MOSFET_PIN, OUTPUT);
  digitalWrite(POWER_MOSFET_PIN, HIGH); mosftetState = true; // reuired if HIGH logic power the strip, otherwise must be commented.
 pinMode(DATA_PIN, OUTPUT); // Initialize the data pin as an output

Generic_WS2812_Strip_edit.zip

@mariusmotea
Copy link
Member

Hi,

RX pin has a special hardware feature used by Neopixel library to control the leds, it cannot be changed unless the library is replaced with a different one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants