Go Down

Topic: LED indicator for data pin (Read 219 times) previous topic - next topic

kaitoukid93

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

larryd

#1
Aug 04, 2017, 03:57 pm Last Edit: Aug 04, 2017, 04:01 pm by larryd
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 ( )
No technical PMs.
The last thing you did is where you should start looking.

kaitoukid93

thanks. but my purpose was to use only the D3 to control the led strip ambbilight and by the way light up the indicator

larryd

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.



No technical PMs.
The last thing you did is where you should start looking.

kaitoukid93

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

Wawa

Use pin 13.
That will flash the onboard LED.
Leo..

larryd

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.




.
No technical PMs.
The last thing you did is where you should start looking.

Grumpy_Mike

#7
Aug 05, 2017, 06:09 am Last Edit: Aug 05, 2017, 06:10 am by Grumpy_Mike
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.

kaitoukid93

thanks all of you
thankssssss

Go Up