验证中...
实验七--数位计及1602屏亮度显示
Raw Copy
void loop(){
if (digitalRead(2) == 0) {
delay(300);
state = state + 1;
Serial.println(state);
if ((long) (state) % (long) (2) == 1) {
analogWrite(11,(analogRead(A1) / 4));
mylcd.setCursor(0, 0);
mylcd.print("2017764327 zwd");
mylcd.setCursor(0, 1);
mylcd.print((analogRead(A1) / 4));
} else {
analogWrite(11,0);
mylcd.setCursor(0, 0);
mylcd.print("2017764327 zwd");
mylcd.setCursor(0, 1);
mylcd.print("000");
}
}
}

Comment list( 0 )

Sign in for post a comment

Help Search

191139_cd20d5fd_5186603 191143_ebef6f8d_5186603