Considering that:
The total series resistance of the circuit for a current of 10mA is (5-1.5)/0.01 = 350 Ohm.
Since the internal resistance of the output is 25 Ohm, the external resistor should be 325 Ohm.
A 330 Ohm resistor from the E12 series of preferred values will work, giving a current slightly below 10mA.
// Simple implementation using the standard delay() function.
// This code uses a blocking functions, halting all other operations during the delays.
// A better approach would be to use a non-blocking timer interrupt approach.
// Define the pin the LED is connected to.
#define LED_PIN 13
// Define the ON and OFF durations in milliseconds.
const int ON_DURATION_MS = 400; // LED stays ON for 400ms
const int OFF_DURATION_MS = 800; // LED stays OFF for 800ms
void setup() {
// Set the LED pin as an output.
pinMode(LED_PIN, OUTPUT);
}
void loop() {
digitalWrite(LED_PIN, HIGH);
delay(ON_DURATION_MS);
digitalWrite(LED_PIN, LOW);
delay(OFF_DURATION_MS);
}
Add video of the output (know more)
