我正在试着做一个程序,告诉轮班工人他/她哪几天上班,哪几天休息。例如,on 4,off 4。下面是我的代码: schedule = ['monday','tuesday','wednesday','thursday','friday','saturday','sunday']
on = 4
off = 4
count = 0
while count < 3:
for x in range(on):
print(
我正在尝试创建一个模式,它将打开和关闭一个Arduinos端口。然而,在大约2次开/关之后,它被卡住了,除非我拔下Arduino的插头,否则它不会关闭。我尝试了许多解决方案,比如在int向端口供电后,尝试将int设置为0。下面是我在服务器端和arduino端的代码:
Arduino代码:
int Relay = 13;
//The pin that the relay is attached to
//int time;
//Creates temp variable
void setup() {
Serial.begin(9600);
pinMode(Relay, OUTP