Go Down

Topic: scaling data? (Read 213 times) previous topic - next topic

t3rror23

hey guys...i normally try not to disturb the arduino team unless i really cant find something...weeeel nows one of those times haha...basically im looking for help on "scaling" my the range of data to fit another range if that makes any sence...for example, the PWM signal is 8 bits so thats a resolution of 256..and an LDR could be from 5 to 560 or something random (example) how would i get the sensor information to fit that resolution in my code as evenly as possible? i have no idea what it would be called so i couldnt google it exactly...thanks in advance:)

PaulS

Quote
how would i get the sensor information to fit that resolution in my code as evenly as possible?

map().

Go Up