added LED light control test code and fixed a bug