Help with MAP Funtion

Hi everyone

I would like to control the brightness of a LED with my Arduino UNO.
I use the example program AnalogInOutSerial, and attache hardware as shown on the Arduino Web side under Lerning, AnalogInOutSerial.
A Poti on power, ground and input A0, and a LED on output 9 and ground. This works very well.
I like to change the input voltage from 0 to 5V to .25 to .45V and still see the same affect on the LED.

Is this possible?
Can i still use the MAP function?
What values do i have to plug into the MAP Function to make it happen?

Thanks for your help.

Tom

I like to change the input voltage from 0 to 5V to .25 to .45V and still see the same affect on the LED.

OK

Is this possible?

Yes but you might not get as smooth a result.

Can i still use the MAP function?

Yes.

What values do i have to plug into the MAP Function to make it happen?

The right ones. Just take a reading at the maximum and minimum input voltage and put those in.

Thanks Grumpy_Mike

I opened the serial monitor with the poti hooked up and the values change accordingly as i move through the 0 to 5V range.
However, with my .24 to .45V hooked up the values stay near 0 and do not change as i move to the range.
When i remove the input from A0 the numbers change to a higher value.

Is the .2V change to small?
Can the signal be to weak?

Thanks

Tom

The external voltage must be referanced to ground, is it?

With such low voltages, I'd think about using the internal voltage reference.

Thanks for your help guys

A picture says more then thousand worts.

You see the poti on the beat board and the green wire in the bottom hooks up to A0 to control the LED.Works fine.

The box on top is the reciver from a remote control .
Each of the 8 slots for the servos has 3 pins.
Pemanent ground, permanent 5V, and signal.
The signal pin changes its voltage between .25 and .45V depending on the position of the control stick on the transmitter.
I would like to control two electric motors of a R/C controled tank with this setup.
Do you see somthing wrong with this setup?
Do you know of a better way to control the Arduino with a R/C.

Thanks
Tom

The signal pin changes its voltage between .25 and .45V depending on the position of the control stick on the transmitter.

That's what it may look like to a slow sampling DVM.
But that won't be what the Arduino or an oscilloscope sees.

Have a look at some of DuaneB's posts.