Organizovao u direktorijume po predavanjima
This commit is contained in:
1 parent
077e592d18
commit
2f474ae901
12 files changed
+168
No files matched your search
@@ -0,0 +1,15 @@
|
||||
|
||||
int button = 2; // Taster je povezan na pin 2
|
||||
int button_state;
|
||||
|
||||
void setup() {
|
||||
pinMode(button, INPUT); // Inicijalizuje pin 2 kao ulaz
|
||||
|
||||
Serial.begin(9600); // Inicijalizuje serijsku komunikaciju na brzini od 9600 bit/s
|
||||
}
|
||||
|
||||
void loop() {
|
||||
button_state = digitalRead(button); // Ocitava stanje tastera
|
||||
Serial.println(button_state); // Stampa stanje tastera
|
||||
delay(1); // Kratka pauza izmedju ocitavanja
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Reference in new issue
Block a user