LED
Controls
Properties
Availability & Pricing
Distributor | Qty 1 |
---|
Assets
id=on
id=LED_D5.0mm_Clear
id=LED-THT
id=off
Simulation
Plaintext
# Plant Grow Light A LED-based grow light designed for optimizing plant growth using blue and red light. # Project Components ## Power Supply: PS Category: Power Pins: +, - Pin Number: 2 ## Resistor: R1 Value: 22Ω Power Rating: 5W Pins: 1, 2 ## LED: D1 Type: Red LED Forward Voltage: 2.0V Current: 350mA Pins: Anode, Cathode ## LED: D2 Type: Blue LED Forward Voltage: 2.0V Current: 350mA Pins: Anode, Cathode # Electrical Connections - Connect PS:+ to R1:1 - Connect R1:2 to D1:Anode - Connect D1:Cathode to D2:Anode - Connect D2:Cathode to PS:-
LED_BUILTIN
is normally defined as a constant in the board variant, representing the GPIO number of the built-in LED:Cpp
// Define the LED_BUILTIN if it's not defined by the Arduino framework // Usually on ESP32 it's defined as pin 2 #ifndef LED_BUILTIN #define LED_BUILTIN 2 #endif void setup() { // Set the built-in LED as output pinMode(LED_BUILTIN, OUTPUT); } void loop() { // Turn the LED on digitalWrite(LED_BUILTIN, HIGH); // Wait for a second delay(1000); // Then turn it off digitalWrite(LED_BUILTIN, LOW); // Wait for another second delay(1000); }
Designator | Ruleset | |
---|---|---|
Welcome 👋
Flux helps you build PCBs faster with an AI teammate!
To use this component and get started with Flux sign up now.
shaan
copilot