using poll function in main.cpp, assertion in led.cpp