Go Down

Topic: scaling data? (Read 235 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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy