Questions tagged [led]
An LED is a type of light source which is typically fairly small and has low power requirements.
861 questions
2
votes
1
answer
212
views
ESP32 LED PWM fade not working?
Not sure if this belongs more in an electronics SE, but I'll give this a try.
I'm trying to use an ESP32-C3 and an NPN transistor (2N5551) to PWM drive an LED (values below). I'm trying a simple fade, ...
0
votes
1
answer
383
views
P10 LED Display Character Overlaying with DMD library
Hi, I am using p10 Led display and trying to make digital clock. it works fine but after 2 or more weeks later without any switch off there is a overlaying start on characters. why this happening I ...
-1
votes
2
answers
78
views
LED will fade in but not fade out
The brightness of the LED gets higher normally but when it gets to full brightness it just stays like that - it doesn't dim. Sorry if this has already been answered I just can't seem to find anything ...
0
votes
1
answer
66
views
Same LED but different brightness on same PIN
I connected a led to pin 7 (with a small resistance to avoid burning it) and tried the code below, with and without pinMode as output
void setup() {
pinMode(7, OUTPUT);
Serial.begin(9600);
}
void ...
0
votes
2
answers
170
views
Just one more pin!
I have an Arduino project to control a motor's speed at 3 levels, indicated by 3 LEDs, so level 1 is speed 1 and LED 1, and so on for levels 2/3.
Also, I added a low-battery voltage indicator to ...
0
votes
1
answer
113
views
blink a Grove - RGB LED Stick
I am trying to blink a Grove - RGB LED Stick (10 - WS2813 Mini 3535) with this code:
#include "FastLED.h"
int ledState = LOW; // ledState used to set the LED
long previousMillis = 0; ...
3
votes
1
answer
1k
views
Does the UNO R4 still have the standard on-board led on pin 13?
I need to add support for the UNO R4 (both models) for a library I'm maintaining. The library uses the LED on pin 13 as status indicator. I can't find any information whether that LED is still there ...
3
votes
2
answers
398
views
How to turn LEDs based on voltage readings?
I am trying to turn LEDs in an LED bridge based on the voltage reading from a power source. when the Voltage is zero nothing is ON and then the LEDs gradually turn ON as increase the voltage connected ...
2
votes
1
answer
521
views
ESP8266 seems to be killing a while loop
When i was testing out a program I found a strange behavior of esp8266
It seems to get out of a while loop even when there's no option of getting out on code
I don't know if these are related but here'...
1
vote
2
answers
1k
views
How do I turn on 3 LEDs in a repetitive sequence where all three LEDs would then turn OFF when the push button used is released?
Basically, how do I modify my code listed below to turn ON each of the three LEDs one at a time in a repetitive sequence while keeping the push-button pressed?
Red (3 sec),
Yellow (1 sec), and
Green (...
0
votes
1
answer
192
views
fastLED help - special reinforcements needed
Hello help needed trying to get fastLED to start and stop at specific points on the strip, i have this nice fade animation but need to split the strip intov about 3 sections and have it run at ...
-1
votes
1
answer
225
views
RGB LED randomized colors and LDR fading at the same time
Im trying too make an RGB LED that keeps changing color's randomly, and makes the brightness fade at the same time with an LDR, yet I keep getting an error that says too many arguments to functions.
...
-1
votes
1
answer
98
views
I don't understand what's wrong with this code [closed]
int ledy = 5 ;
int leds = 4 ;
int ledk = 3;
int button = 2 ;
int count = 0 ;
void setup()
{
pinMode(ledy, OUTPUT);
pinMode(leds, OUTPUT);
pinMode(ledk, OUTPUT);
pinMode(button,INPUT);
...
0
votes
3
answers
3k
views
Interrupt on button press + debouncing
I want to have an interrupt function executed whenever a button is pressed.
The button is connected to pin 2 and the GND. Therefore, the pin is turned to LOW whenever the button is pressed. In ...
1
vote
2
answers
267
views
PWM with a TRANSISTOR on flexible LED filament
I would like to create a custom lighting, with PWM capability, powered from battery. I would like to use flexible led filaments, and since those consumes more than 40mA, I can't use them directly on a ...
0
votes
1
answer
486
views
Simple FastLED sketch that crashes when led strip is long but not when its shorter
I have a pretty simple sketch that crashes, and crashes hard (Platform.io console says "Disconnected (read failed: [Errno 6] Device not configured)" and I need to power off/on the Arduino to ...
-1
votes
1
answer
72
views
Function call only works if called once
I have 3 LED chains which are all mapped to concentric rings. Each ring has a its own 2D array with the chain number & LED number. I have a function that is passed a ring array and then lights the ...
2
votes
1
answer
197
views
One LED in 4x4 matrix does not turn on [closed]
I'm an art student and absolute beginner to electronics/code - my broader goal is to learn how to control individual LEDs when there are many of them (like 64 or more even, so am learning about ...
0
votes
1
answer
287
views
Stepper motor and blink LED
I connected a LED stick to a stepper motor. Is it possible to blink the LED without stopping the motor rotation?
I am using SparkFun RedBoard Plus, Qwiic LED Stick - APA102C, Adafruit Stepper motor - ...
-2
votes
1
answer
314
views
LED blink patterns with multiple LEDs with millis() not using Delay()
I want to make LED blink patterns with multiple LEDs with the millis() function. I researched about it but did not find a perfect solution.
I found one blog, but it is using a LED pin number array; I ...
-1
votes
1
answer
78
views
How to turn led lights off and on in order when below a certain photovalue?
I'm making a traffic light simulation with a photoresistor but it's not working properly.
When the photovalue drops below a certain point ( a car comes by) a peeping sound should play for a second and ...
1
vote
0
answers
255
views
FastLED changing colour at holding state
Basically make a code to guide users through a box breathing exercise (breath in for 4 seconds, hold for 4, release for 4, hold again for 4, repeat) to help relax them.
Right now my code is running ...
0
votes
1
answer
102
views
How do I keep one function continued until a variable is completed?
The code's purpose is to change from one led to another if the LDR detects a certain level of light for a given time. Currently, since I cannot wait 5 minutes to complete one circuit, each LED should ...
5
votes
1
answer
2k
views
How arduino PORTB pins are addressed if I want to access them with pointer?
So Let say I want to access Digital Pin 13. Thats port B pin. Is there an memory address associated with this pin 13 of Arduino Uno r3?
How Port B pins are addressed with corresponding pin numbers ...
2
votes
2
answers
1k
views
Toggle button switches through case statements with button debouncing
The overview of my code is that I want a toggle button to be pushed and each button push will move the code to the next case statement. In each case statement, there will be different LED functions. I ...