Solve mathematical formula to measure the intensity of the arduino led?

(∑_(l=i)^k▒l^2 / ∑_(l=i)^k▒l^1 )+V = led value

Led severity connected to one pin of arduino is the result of the equation ?

i=2 k=5 V=analog a value

can you help me write the code ?

Use a calibrated light meter to measure the intensity of light emitted by an LED. The intensity cannot be calculated, as all LEDs are different.

I have no idea what the formula is supposed to represent.

It would be better if you tell us why you need to make this calculation. What is the application?

the result of this formula is measuring the intensity of the led and i need the arduino code

the result of this formula is measuring the intensity of the led

Please explain.

The reposted formula still makes no sense, but are you having trouble to work out the result of (4+9+16+25)/(2+3+4+5)?

jremington:
Please explain.

The reposted formula still makes no sense, but are you having trouble to work out the result of (4+9+16+25)/(2+3+4+5)?

I have trouble writing the arduino code of this formula

busranur:
I have trouble writing the arduino code of this formula

What trouble? What have you tried? What was the output?

Paul

@busranur,

If English is not your native language, you might wan't to check out the International section for a forum in a language that will allow you to better describe what you're trying to do.

If English is your native language, then you really need to work on your communications skills with respect to asking technical questions.

I have trouble writing the arduino code of this formula

The formula makes no sense, so the code would not make sense either.

The code is straightforward enough for the formula given. Whether or not the formula makes any sense is another matter.

// Input Parameters???
int i = 2 ;
int k = 5 ;
float V = 1.2 ;

// Initialize accumulators
float numerator = 0 ;
float denominator = 0 ;

// Perform summations
for (int l = i; i <= k; i++) {
  numerator = numerator + l * l ;
  denominator = denominator + l ;
}

// Put it all together
float led_degeri = numerator / denominator + V ;

Without going to the trouble of writing an Arduino program, the result is (54.0/14.0)*V.

MrMark:
The code is straightforward enough for the formula given. Whether or not the formula makes any sense is another matter.

// Input Parameters???

int i = 2 ;
int k = 5 ;
float V = 1.2 ;

// Initialize accumulators
float numerator = 0 ;
float denominator = 0 ;

// Perform summations
for (int l = i; i <= k; i++) {
  numerator = numerator + l * l ;
  denominator = denominator + l ;
}

// Put it all together
float led_degeri = numerator / denominator + V ;

Thank you very much :slight_smile: I guess to improve my formula arduino coding ability.