add detect orientation and
Merge branch 'master' of https://github.com/phthhieu/LightSwitchRepo