but i have no idea how to make RSSI related to the voltage in order to control intensity of light.
What are you getting the Relative Signal Strength Indicator of? How are you getting it? What values are you getting? Do the values change as you expect?