Arduino Nano + HC-05 + Neopixel LED + ZERGBA

Hi everyone,

I’m still relatively new to Arduinos and programming and am having trouble getting the leds to light up.

I am connecting a HC-05 to the Arduino Nano and a Neopixel LED Strip.

The phone connects fine with the Blynk App.

I started by using the code from the example and tried troubleshooting it with information online.
My ZeRGBA settings:
Merge
V1
Send on release: ON

Here is the code that I’ve used:

#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX

#include <BlynkSimpleSerialBLE.h>
#include <SoftwareSerial.h>
#include <Adafruit_NeoPixel.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "4ae94b10958f41d19f00419ad9145946";

SoftwareSerial SerialBLE(10, 11); // RX, TX
#define PIN 6
#define NUMPIXELS 1


Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUMPIXELS, 6, NEO_GRB + NEO_KHZ800);

// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
  if (WheelPos < 85) {
    return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
  } else if (WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  } else {
    WheelPos -= 170;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
}

BLYNK_WRITE(V1)
{
  int R = param[0].asInt();
  int G = param[1].asInt();
  int B = param[2].asInt();

  for (int i = 0; i < NUMPIXELS; i++) {
    // pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
    strip.setPixelColor(i, strip.Color(R, G, B)); // Moderately bright green color.
    strip.show(); // This sends the updated pixel color to the hardware.
  }
  }

void setup()
{
  // Debug console
  Serial.begin(9600);

  SerialBLE.begin(9600);
  Blynk.begin(SerialBLE, auth);

  Serial.println("Waiting for connections...");

  strip.begin();
  strip.show();
}

void loop()
{
  Blynk.run();
}

Thank you for your time.

Hello. We don’t teach programming here, nor are we code mechanics. Our purpose is to assist each other with learning how Blynk works… of which you seem to have the basic OK :wink:

As for how to get your Neopixels to work… as you are relying on the for() loop to process all the pixels, I would recommend you try it without Blynk… perhaps in a basic sketch with preset test values for r,g,b and the for() loop in the void setup()… Once you can figure out how to get it to work without Blynk then you can better understand what, if anything, is wrong in this Blynk version.