How do you plan to solve it?
i usually separate this kind of problems in two: Hardware and firmware
Hardware: Let´s find the resistance value that allows a 10mA flowing through the LED
Vin = 5v, Vd = 1.8v ----> Vr = 5v - 1.8v = 3.2v
R = Vr / Ir = 3.2v / 10mA = 320 ohms -----> 330 ohms
void setup() {
pinMode(4, OUTPUT);
}
void loop() {
digitalWrite(4, HIGH);
delay(400);
digitalWrite(4, LOW);
delay(800);
}
https://wokwi.com/projects/new/arduino-uno

Add a photo of your hardware showing the output.