for (size_t i = 7; i >= 0; i--)//Master bit first// 高位先发送
{
digitalWrite(Dat_Pin, ((data>>i)&0x01));
delayMicroseconds(1);
digitalWrite(CLK_Pin, HIGH);
delayMicroseconds(1);//这个要维持1us
digitalWrite(CLK_Pin, LOW);
digitalWrite(Dat_Pin, LOW);
delayMicroseconds(1);
}
ssize_t一定不小于0导致的死循环!!!