Arduino Forum

Using Arduino => LEDs and Multiplexing => Topic started by: kaitoukid93 on Aug 04, 2017, 03:15 pm

Title: LED indicator for data pin
Post by: kaitoukid93 on Aug 04, 2017, 03:15 pm
hello, Im controlling ws2812b using an arduino nano(ambilight), and the data sent out by D3
I just want to make a normal led (like TX and RX led) to show me that the D3 is working
can someone help me?
thanks
Title: Re: LED indicator for data pin
Post by: larryd on Aug 04, 2017, 03:57 pm
This should help:

Code: [Select]

//Demonstrates how to control one pixel

#include <Adafruit_NeoPixel.h>

#define PIN        3
#define PixelCount 1

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

void setup()
{
  strip.begin();
  strip.setPixelColor(0, 0);
  strip.show(); // Initialize all pixels to 'off'

} //END of   s e t u p ( )

void loop()
{
  //turn on one neo pixel
  strip.setPixelColor(0, strip.Color(255, 0, 0));     //Red
  //strip.setPixelColor(0,strip.Color(0, 255, 0));      //Green
  //strip.setPixelColor(0,strip.Color(0, 0, 255));      //Blue
  //strip.setPixelColor(0,strip.Color(255, 255, 255));  //White

  strip.show();

  delay(500);
  strip.setPixelColor(0, strip.Color(0, 0, 0));         //Turn off pixel
  strip.show();
  delay(500);

} // END of      l o o p ( )
Title: Re: LED indicator for data pin
Post by: kaitoukid93 on Aug 04, 2017, 09:28 pm
thanks. but my purpose was to use only the D3 to control the led strip ambbilight and by the way light up the indicator
Title: Re: LED indicator for data pin
Post by: larryd on Aug 04, 2017, 09:46 pm
You are going to have to explain things better.
Give us a link to your hardware.

Show us a good schematic of your circuit. 
Show us a good image of your wiring.



Title: Re: LED indicator for data pin
Post by: kaitoukid93 on Aug 04, 2017, 11:17 pm
I said, it's like the Tx Rx led, blinking means Tx or Rx is working
so I want to make a similar one but with the D3 pin
(http://2.pik.vn/2017cc74f38b-f696-47ed-a2b2-983b3e9074c7.jpg)
Title: Re: LED indicator for data pin
Post by: Wawa on Aug 04, 2017, 11:20 pm
Use pin 13.
That will flash the onboard LED.
Leo..
Title: Re: LED indicator for data pin
Post by: larryd on Aug 04, 2017, 11:32 pm
Add a LED and a series 470Ω  resistor on pin 3  then connect to GND/+5V similar to D1 or D2 in the attached image.

(https://i.imgur.com/HCRzgrC_d.jpg?maxwidth=640&shape=thumb&fidelity=high)


.
Title: Re: LED indicator for data pin
Post by: Grumpy_Mike on Aug 05, 2017, 06:09 am
I said, it's like the Tx Rx led, blinking means Tx or Rx is working
so I want to make a similar one but with the D3 pin
In that circuit connect a 470R resistor to the free end of the LED and then the other end of the resistor to ground.

It will flash when ever you call the show method.
Title: Re: LED indicator for data pin
Post by: kaitoukid93 on Aug 05, 2017, 07:25 am
thanks all of you
thankssssss