LED and resistor in series from +5V to digital in - General
![LED and resistor in series from +5V to digital in - General](https://europe1.discourse-cdn.com/arduino/original/4X/8/c/c/8cc7eba8fadf498d52912ddeae117111e836ef57.jpeg)
Possibly a daft question and I've very likely missed something somewhere but any search just brings up variations on the "blink" sketch. I'm wiring up a toggle switch across a digital input and was hoping to put in (for purely aesthetic purposes) an LED. TO save writing code is it alright to to put the resistor and LED off the com pin of the toggle switch to the digital pin so that when the switch has +5V across it the LED comes on?
![](https://forum.allaboutcircuits.com/proxy.php?image=http%3A%2F%2Fwww.horrorseek.com%2Fhome%2Fhalloween%2Fwolfstone%2FLighting%2Flitlpo_SeriesLEDPict.png&hash=97c430650b2f8ce45c9e0ca5284b59fd)
Resistor needed for LEDs?
![](https://farm3.staticflickr.com/2588/3925934116_503f0a17d5.jpg)
Basics: Picking Resistors for LEDs
![](https://pages.uoregon.edu/torrence/432/images/task1_bb.png)
PHYS 432 - Buttons and Lights
![](http://community.robotshop.com/forum/uploads/default/original/2X/7/7ccb0a45c34aba5320a055747184da4ecc83ba4c.jpeg)
LEDs say yes, but Input pins say nothing, or too many things?! - General Discussions - RobotShop Community
![](https://www3.ntu.edu.sg/home/ehchua/programming/arduino/images/RGB_LEDStrip_Driver.png)
Android Basics and User Interfaces
![](https://content.instructables.com/FNQ/ZPA8/JIKJZDDD/FNQZPA8JIKJZDDD.png?auto=webp&fit=bounds&frame=1&height=1024&width=1024auto=webp&frame=1&height=150)
Photoresistor (Analog Input) : 5 Steps - Instructables
![](https://www3.ntu.edu.sg/home/ehchua/programming/arduino/images/WS2812LEDStrip.png)
Android Basics and User Interfaces
![](https://www3.ntu.edu.sg/home/ehchua/programming/arduino/images/ArduinoEx1Blink.png)
Android Basics and User Interfaces
![](https://theorycircuit.com/wp-content/uploads/2017/07/rgb-led-arduino.png)
RGB LED Arduino
![](https://i.ytimg.com/vi/DjkCz821_V0/maxresdefault.jpg)
Step by step electronics circuit builds 1 lighting a resistor protected LED on a breadboard
![](https://ai.thestempedia.com/wp-content/uploads/2022/07/evive_digital.png)
Introduction to Digital I/O Pins on evive
![](https://www2.cs.uregina.ca/~jaclarke/Arduino/Blinkenlights/Pictures/led_resistor_schem.png)
Blinkenlights