I have created the arduino uno that connect to bluetooth to control the lamp. its working but the problem is i want the lamp to auto off if the bluetooth devices is out of range. Any of u can help?
Which bluetooth device are you using?
I use an HC-05 on a 6 pin breakout board. This breakout board provides an "LED" pin for the user that will supply a small voltage if the bluetooth module has an active connection.
Without knowing what you are using there is no way of knowing if it can provide do something similar.