xbee s2c speed control without potentiometer

i am making home automation project with xbee s2c . i want to control intensity of light , so i need help.