 I have to write a program that measures voltage from 0-10v, the input voltage cannot exceed three volts, then light ten leds 1 led per volt. So for the input voltage I think I need a voltage divider to keep it below 3v. I'm not sure how to convert that into a 0-10v reading and then send each volt increment out to the leds.

I have to write a program that measures voltage from 0-10v, the input voltage cannot exceed three volts

Then the voltage is not in the range - to 10V, is it?

then light ten leds 1 led per volt.

10 LEDs for 0 to 3?

I think I need a voltage divider to keep it below 3v.

Of course you do.

I'm not sure how to convert that into a 0-10v reading

I'm willing to bet that if you use a voltmeter and print the value read by the Arduino you will see a pattern.

The range of values read will be between 0 and 1023. The range of voltages will be 0 to 10 (or is it 3?). It's easy to convert from one range to the other.

and then send each volt increment out to the leds.

Once you know the voltage, you'll know how many LED pins to turn on. Turning n pins on is easy, if the pin numbers are in an array.

When is our homework due?

+1

The voltage range is 0-10v. It's using a variable power supply from 0-10v. 10 leds for each volt. The Arduino can only take 5v max so the divider is to keep it under that. The three volts is just another restriction added to the assignment. Anyway I figured it out so gfy. :)

Anyway I figured it out so gfy.

not entirely sure I know what "gfy" stands for ?

Would it be possible to enlighten me/us ?

-dan

dsauriol: not entirely sure I know what "gfy" stands for ?

Would it be possible to enlighten me/us ?

-dan

Per urban dictionary:

gfy

Could mean either "Go fuck yourself" or "Good for you". Either one works quite effectivly.

person1: "Yeah, I won the prize!11!!!1" person2:"GFY" person1:"wha?"