LED and resistor in series from +5V to digital in - General

Di uno scrittore di uomini misteriosi

Descrizione

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?
LED and resistor in series from +5V to digital in - General
Basics: Picking Resistors for LEDs
LED and resistor in series from +5V to digital in - General
Choosing the Resistor to Use With LEDs : 3 Steps - Instructables
LED and resistor in series from +5V to digital in - General
Why does my electric circuit to control a 12V circuit (solenoid) with a 5V circuit (GPIO, Arduino) using an optocopler and a Mosfet not work? - Quora
LED and resistor in series from +5V to digital in - General
Lesson 1 - Blinking LED
LED and resistor in series from +5V to digital in - General
voltage - Running 5V status LEDs on 24V circuit? - Electrical Engineering Stack Exchange
LED and resistor in series from +5V to digital in - General
Pairing a Light Dependent Resistor with an Arduino - Circuit Basics
LED and resistor in series from +5V to digital in - General
Controlling Multiple LEDs in Series and Parallel - Project Guidance - Arduino Forum
LED and resistor in series from +5V to digital in - General
Simple way to use USB Type-C to get 5V at up to 3A (15W) - Power - Electronic Component and Engineering Solution Forum - TechForum │ DigiKey
LED and resistor in series from +5V to digital in - General
Can't get these relays to trigger with 5V or 24V. Am I doing something wrong? : r/AskElectronics
LED and resistor in series from +5V to digital in - General
Why do we connect the resistor to ground for the LEDs in the Arduino starter kit project two? - Quora
da per adulto (il prezzo varia in base alle dimensioni del gruppo)