Need your expertise in this. We know that "Map" function re-maps the incoming signal from one value to another value. Let us consider this
Say my incoming signal is a 50Hz (with voltage level ranging from 0-2.5 V) PWM signal and I would like to convert it to a higher volt range say 0-3.5V (of steady DC signal) , I would note down the pulse duration of the incoming signal by using "PulseIn" function and with the "Map" function I will convert the range and get the output using "AnalogWrite" function. Say
duration = pulseIn(pin, HIGH);
outputValue = map(duration, 871, 1717, 50, 169);
analogWrite (out, outputValue);
- Now what I would like to know what would be the properties of the output signal i.e whether the output signal frequency will be 490Hz PWM (for pin 9 & 10 in Arduino Mega) irrespective of the input signal frequency (50Hz) or the it will change.
I'm new to this and it would be of a great help if you can provide an answer.
Thank you all in advance