Difference between revisions of "Arduino - tlačidlá"
(Created page with "Vyskúšajme zobrazovať stav tlačidla na sériovom porte: <syntaxhighlight lang="C" line='line'> void setup() { Serial.begin(9600); pinMode(12, INPUT); digitalWrite(1...") |
(No difference)
|
Revision as of 07:51, 31 July 2018
Vyskúšajme zobrazovať stav tlačidla na sériovom porte:
1 void setup() {
2 Serial.begin(9600);
3 pinMode(12, INPUT);
4 digitalWrite(12, HIGH);
5 }
6 void loop() {
7 Serial.println(digitalRead(12));
8 delay(500);
9 }