Jupiter Moll
Member
Hallo...;
I`m trying to map 0 to 1024 sensor values in to a range of 0.001 to 1.0 using the modified map()
within the Audio Library because a lot of their function parameters expect floating points between 0 and 1.0
The Problem I only get values between 0.01 to 0.99 when I try to evaluate it with the Serial Monitor using:
So loosing 90% of my resoltuion.
Expected was 0.001 to 1.0 to have 1000 steps for smoother rise of the level-gain.
Any ideas?
ThX
I`m trying to map 0 to 1024 sensor values in to a range of 0.001 to 1.0 using the modified map()
within the Audio Library because a lot of their function parameters expect floating points between 0 and 1.0
Code:
float level = map(float(AnalogValues),0.0 , 1024.0, 0.001, 1.0);
Serial.println(level);
//mixer.gain(0, level);
The Problem I only get values between 0.01 to 0.99 when I try to evaluate it with the Serial Monitor using:
Code:
Serial.println(level);
Expected was 0.001 to 1.0 to have 1000 steps for smoother rise of the level-gain.
Any ideas?
ThX
Last edited: