How can I adjust RGB luminosity with TSL2561 sensor

+2 votes
asked Feb 17, 2016 by gaetan-kueny (180 points)
edited Dec 9, 2016 by vandenbo

With this command :

uint16_t x = tsl.getLuminosity(TSL2561_VISIBLE);

I can get luminosity approximatively between 0 and 4500.

But RGB led brightness is between 0 and 256.

Does it exist a command to adjust TSL2561 luminosity to RGB led brightness ?

1 Answer

+2 votes
answered Feb 17, 2016 by vandenbo (510 points)

You should use the map() function

https://www.arduino.cc/en/Reference/Map

Welcome to OpenWiNo Q&A, where you can ask questions and receive answers from other members of the community.
To change your password you must follow THIS link.

24 questions

32 answers

18 comments

37 users

...