Getting Input from LEDs

I am trying to count the number of blinks of the LED
is there a way to directly count the number of blinks without using a light sensor ??
If so, can someone help me construct the code?

What LED? What product? What do you really try to do? XYproblem!

I am planning to do an energy meter with arduino uno
i wanted to count the LED blink of the meter
I soldered wires to the anode and cathode of the LED
is there a way to record the blinks using these wires?

I just wanted to know how to do this part and work my way up in completing my mini project.

  1. Is it the meter that bills you of which you soldered wire to? Good luck explaining that to the company...
  2. Probably possible. But you have to know more about the device. That clearly is above your level. Do note, those wires may even be at mains voltage! (Assuming a mains meter) so be warned!

Aka, just adding a LDR is sooooo much simpler and safer.

Thank you for the concern, i bought my own meter to experiment with :)))

Thank you, i'll better take this path with sensor then
since you said it is simpler and safer

You could wire up the anode and cathode to the LED side of an optical isolator with the addition of a small resistor in line with the one of those wires. Measure the voltage you get from the anode and cathode and use it to calculate the resistor's size.

Then you can safely wire the other side to your Arduino.

Another way to monitor power usage is with a non-invasive current clamp.