0

NEOPIXEL LED Strip, NRF52, Android BLE Control
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: NEOPIXEL LED Strip, NRF52, Android BLE Control

by Gameaddict77 on Tue Feb 13, 2018 2:22 am

Hello,

I'm not sure if I can add into this or need my own topic but im having the exact same issue and I tried the fix above. I'm using 240 adafruit neopixel (whole roll) https://www.adafruit.com/product/2964 with nrf52 and it behaves so abnormal and inconsistent. All I can get is white and that's sometimes not always. On my pixel 2 with Android 8.10 the app constantly crashes I've tried my Nexus 6p with Android 7.0 on it and it didn't crash as much but still didn't perform right. I'm driving the LEDs with separate power (comp power supply for bench testing, 5v) and I can connect to nrf52 but the neopixel portion of app doesn't work. I've used the example on nrf52 set up to control LEDs and then tried to modify it to the file snippets posted for delware. Please see my attached code. Any help would be very much appreciated

My goal is to control the LED colors via Bluetooth from my Android device
Attachments
neopixel-demo.ino.zip
Original based on nrf52 example
(2.99 KiB) Downloaded 9 times
neopixel-demo2.ino.zip
With delware mods
(3.01 KiB) Downloaded 12 times

Gameaddict77
 
Posts: 9
Joined: Sun Feb 11, 2018 11:13 pm

Re: NEOPIXEL LED Strip, NRF52, Android BLE Control

by Gameaddict77 on Wed Feb 14, 2018 5:17 pm

Sorry guys. I'm a lil impatient and new to these forums. Not sure if I'm in wrong place or just impatient to responses. Any help would be great. I've been struggling on this for weeks

Gameaddict77
 
Posts: 9
Joined: Sun Feb 11, 2018 11:13 pm

Re: NEOPIXEL LED Strip, NRF52, Android BLE Control

by sabhuku on Sat Feb 24, 2018 12:08 am

I have tried both the neopixel-demo and neopixel-demo2 and I am able to change the color of some Neopixels using the android app. The pixel configuration I have (ring), is not one of the standard choices and so I get some rather interesting sequencing but I can change the colors. Have you tried the NeoPixelTest sketch to see that you have control of the pixel color and you may want to look at the Serial Monitor when using bluetooth to see what is being communicated.

Code: Select all | TOGGLE FULL SIZE
// Simple NeoPixel test.  Lights just a few pixels at a time so a
// 1m strip can safely be powered from Arduino 5V pin.  Arduino
// may nonetheless hiccup when LEDs are first connected and not
// accept code.  So upload code first, unplug USB, connect pixels
// to GND FIRST, then +5V and digital pin 6, then re-plug USB.
// A working strip will show a few pixels moving down the line,
// cycling between red, green and blue.  If you get no response,
// might be connected to wrong end of strip (the end wires, if
// any, are no indication -- look instead for the data direction
// arrows printed on the strip).

#include <Adafruit_NeoPixel.h>

#define PIN      15
#define N_LEDS 12

Adafruit_NeoPixel strip = Adafruit_NeoPixel(N_LEDS, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin();
}

void loop() {
  chase(strip.Color(255, 0, 0)); // Red
  chase(strip.Color(0, 255, 0)); // Green
  chase(strip.Color(0, 0, 255)); // Blue
}

static void chase(uint32_t c) {
  for(uint16_t i=0; i<strip.numPixels()+4; i++) {
      strip.setPixelColor(i  , c); // Draw new pixel
      strip.setPixelColor(i-4, 0); // Erase pixel a few steps back
      strip.show();
      delay(25);
  }
}

sabhuku
 
Posts: 2
Joined: Sat Feb 10, 2018 10:42 pm

Re: NEOPIXEL LED Strip, NRF52, Android BLE Control

by Gameaddict77 on Sat Feb 24, 2018 7:18 pm

Ok thank you for the response. I'm very excited to hear back I kinda felt like the support was abandoned. I will try that and let you know

Thank you,
Steve

Gameaddict77
 
Posts: 9
Joined: Sun Feb 11, 2018 11:13 pm

Re: NEOPIXEL LED Strip, NRF52, Android BLE Control

by kcl1s on Sat Feb 24, 2018 10:54 pm

Gameaddict77 wrote:Ok thank you for the response. I'm very excited to hear back I kinda felt like the support was abandoned. I will try that and let you know

Thank you,
Steve

You have the best chance of getting Adafruit tech team support by starting a new post rather than tagging on an old post. The tech guys say they look for new posts first.

Fellow hobbyist
Keith

kcl1s
 
Posts: 856
Joined: Tue Aug 30, 2016 12:06 pm

Re: NEOPIXEL LED Strip, NRF52, Android BLE Control

by delawarehunter on Sat Mar 03, 2018 7:46 pm

sabhuku wrote:Faced the same problem and I was able to control the NEOPIXEL LED strip using the Android
Controller app after making some additions to the controller sketch and uploading that onto my NRF52. I figured the changes by looking at the code of the neopixel test sketch.
If you edit the controller sketch, I recommend saving your edited version in a new place as mycontroller or something like that.

Code: Select all | TOGGLE FULL SIZE
//ADDITIONS TO FIX PIXELS NOT LIGHTING UP PART 1 OF 2: Paste under line #include <bluefruit.h>
#define PIN 16  //The pin to which your strip data in pin is connected
#define NUMPIXELS 12 //Edit this to match the number of pixels in your strip
#include <Adafruit_NeoPixel.h>
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
//END ADDITIONS TO FIX PIXELS NOT LIGHTING UP PART 1 OF 2


Code: Select all | TOGGLE FULL SIZE
//ADDITIONS TO FIX PIXELS NOT LIGHTING UP PART 2 OF 2:  Must be in display loop. Paste immediately under line Serial.println(blue, HEX);
    for(int i=0;i<NUMPIXELS;i++) {  //loop through all pixels setting to selected color
     pixels.setPixelColor(i, pixels.Color(red, green, blue));
     pixels.show(); 
     }
 //END ADDITIONS TO FIX PIXELS NOT LIGHTING UP PART 2 OF 2


This did the trick for me! Thank you very much for your help.

delawarehunter
 
Posts: 10
Joined: Sun Jan 28, 2018 10:47 pm

Re: NEOPIXEL LED Strip, NRF52, Android BLE Control

by shahidare on Thu Aug 09, 2018 2:03 am

https://www.youtube.com/watch?v=YMqaNId5_ls&t=60s

4661 neopixels in single project.

shahidare
 
Posts: 2
Joined: Mon Aug 06, 2018 3:32 am

Please be positive and constructive with your questions and comments.