可以用一个数组存放LED灯的状态,在定时器里面为LED赋值数组里面的值就行例如 LED_arr[10] = {0x81,0x42,0x24,0x18,0x24,0x42,0x81};LED = LED_arr[pos++];