Feetech Serial Bus Servo icon Feetech Serial Bus Servo — Control Feetech SC serial bus smart servos via EZB UART or PC COM port with ARC virtual ports, speed, position, release, and acceleration. Try it →
Asked — Edited
Resolved Resolved by RobertL184!
Help Connecting A Neopixel Ring

Help Connecting A Neopixel Ring

Hello all,

Has anyone used a NeoPixel Ring before. I can't figure out how to wire it or connect it to EZB. Here is a link to the NeoPixel Ring site it has a data sheet. https://www.adafruit.com/product/1586

I have look at the I2C but not sure what address or how it is wired.

Thank you.


ARC Pro

Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.

#9  

Thanks robertl284, i just wanted to have the ring change colors on cooand or when talking. curtently i have npt be missing with my robot latly. i will do more reading as time premits. i have no time right now. i am going to give the credit to you as you are the closest to gave a good answer.

thanks.

#10  

@Merne, I am now to this point and have ordered the parts needed to make this work. I will load the sketch onto an android mini and send it to you when I know I have it working. I will also let you know how I have it all wired up and all the other bits of info. It may be a bit of time, but i'll get it to you.

#11  

I have not connected it to an ez-b but I have used a pololu astar arduino board to control neopixels with TTL serial commands using a modification of this arduino sketch.

https://www.tigoe.com/pcomp/code/arduinowiring/1172/

The mod I made was to use serial1 instead of serial. The astar uses a 32u4 processor which has a second serial port on pins 0 and 1. Just had pin 0 of the astar hooked up to a TTL serial source ( the equivalent of a ez-b digital signal pin). What I was sending it was the equivalent to using the ARC sendserial command. (e.g. SendSerial(d0, 9600, "C0,255,0,0" ) ).The ez-b command causes ez-b port d0 to send a string that writes neopixel 0 to bright red. You don't need a full UART to control the arduino since it never sends anything back to the ez-b so any digital port like d0 would work.

The other change I made to the arduino sketch was to change define PIN 13 to define PIN 6 . This lets you connect the neopixel DIN pin to pin 6 of the pololu astar.

#13  

If you are using the ez-b with the lipo battery pack a pololu astar 32u4 mini LV might be the arduino to use as it runs off of 2.7 to 11 volts and has an on-board switching regulator that has up to 1 amp of extra 5V power capacity to run the neopixels with. That extra power should be enough for a couple of the smaller neopixel rings.

My ez-b is embedded in a robot so I can't test it with an ez-b myself.

#14  

Thanks Robert. I will look into it. All of mine are on a shelf right now so when the mini comes in I will play with it and see if I can't release some smoke:)

#15  

Here is the code I was playing with. When I did it I apparently just added the Serial1 feature in and left the original code there as a backup.

/* Simple BlinkyStrip control

This sketch allows serial control over a BlinkyStrip. To set any pixel in the strip, send the following serial string:

Cr,g,b

r, g, and b are ASCII numbers for the red, green, and blue brightness levels, from 0 to 255.

This will probably work for any string of NeoPixels from Adafruit as well.

Uses Adafruit's NeoPixel library: https://github.com/adafruit/Adafruit_NeoPixel

created 4 Dec 2014 by Tom Igoe

*/ #include <Adafruit_NeoPixel.h>

#define PIN 6

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

int pixel = 0; // pixel number that you're changing int red = 0; // red value int green = 34; // green value int blue = 12; // blue value

void setup() { Serial.begin(9600); // initialize serial communication Serial.setTimeout(10); // set serial timeout Serial1.begin(9600); // initialize serial communication Serial1.setTimeout(10); // set serial timeout strip.begin(); // initialize pixel strip strip.show(); // Initialize all pixels to 'off' }

void loop() { // listen for serial: if (Serial.available() > 0) { if (Serial.read() == 'C' ) { // string should start with C pixel = Serial.parseInt(); // then an ASCII number for pixel number red = Serial.parseInt(); // then an ASCII number for red green = Serial.parseInt(); // then an ASCII number for green blue = Serial.parseInt(); // then an ASCII number for blue } } if (Serial1.available() > 0) { if (Serial1.read() == 'C' ) { // string should start with C pixel = Serial1.parseInt(); // then an ASCII number for pixel number red = Serial1.parseInt(); // then an ASCII number for red green = Serial1.parseInt(); // then an ASCII number for green blue = Serial1.parseInt(); // then an ASCII number for blue } } strip.setPixelColor(pixel, red, green, blue);// set the color for this pixel strip.show(); // refresh the strip }

#16  

Thanks for the example. I think I am going to start with something like this.


/*
Simple BlinkyStrip control

This sketch allows serial control over a BlinkyStrip.
To set any pixel in the strip, send the following serial string:

Cr,g,b

r, g, and b are ASCII numbers for the red, green, and blue brightness
levels, from 0 to 255.

This will probably work for any string of NeoPixels from Adafruit as well.

Uses Adafruit's NeoPixel library: https://github.com/adafruit/Adafruit_NeoPixel

created 4 Dec 2014
by Tom Igoe

*/
#include <Adafruit_NeoPixel.h>

#define PIN 6

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

int pixel = 0; // pixel number that you're changing
int red = 0; // red value 
int green = 34; // green value
int blue = 12; // blue value

void setup() 
{
  Serial.begin(9600); // initialize serial communication
  Serial.setTimeout(10); // set serial timeout
  strip.begin(); // initialize pixel strip
  strip.show(); // Initialize all pixels to 'off'
}

void loop() 
{
  // listen for serial:
  if (Serial.available() > 0) 
    {
    if (Serial.read() == 'C' ) 
      { // string should start with C
        pixel = Serial.parseInt(); // then an ASCII number for pixel number
        red = Serial.parseInt(); // then an ASCII number for red
        green = Serial.parseInt(); // then an ASCII number for green
        blue = Serial.parseInt(); // then an ASCII number for blue
      }
    }

  
   for (int i=0; i<260; i+10)
   {
    delay(50);
    strip.setBrightness(i);
    for (int j=0; j < 16; j++)
    {
      strip.setPixelColor(j, red, green, blue);// set the color for this pixela
    }
    strip.show(); // refresh the strip
   }
   for (int i=250; i > 0; i-10)
   {
    delay(50);
    strip.setBrightness(i);
    for (int j=0; j < 16; j++)
    {
      strip.setPixelColor(j, red, green, blue);// set the color for this pixela
    }
    strip.show(); // refresh the strip
   }
}