int seznam[] = {1, 2, 4, 6, 8, 10, 12};
int seznam1[] = {3, 5, 7, 9, 11, 13, 15};
int tipka1 = 7;
int tipka2 = 6;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(tipka1, INPUT_PULLUP);
pinMode(tipka2, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
/*
for (int x = 0; x < 7; x++) {
Serial.println(seznam[x]);
delay(500);
}
*/
/*for (int x = 0; x < (sizeof(seznam) / sizeof(seznam[0])); x++) {
Serial.println(seznam[x]);
delay(500);
}*/
/*
int vrednost = digitalRead(tipka1);
if (vrednost == 0) {
for (int x = 0; x < (sizeof(seznam) / sizeof(seznam[0])); x++) {
Serial.println(seznam[x]);
delay(500);
}
}
else {
for (int x = 0; x < (sizeof(seznam1) / sizeof(seznam1[0])); x++) {
Serial.println(seznam1[x]);
delay(500);
}
}*/
// rdeca(tipka2) na sodo, zelena na liho
static int vrednost;
if (digitalRead(tipka2) == 0) vrednost = 0;
else if (digitalRead(tipka1) == 0) vrednost = 1;
if (vrednost == 0) {
for (int x = 0; x < (sizeof(seznam) / sizeof(seznam[0])); x++) {
Serial.println(seznam[x]);
delay(500);
}
}
else {
for (int x = 0; x < (sizeof(seznam1) / sizeof(seznam1[0])); x++) {
Serial.println(seznam1[x]);
delay(500);
}
}
}
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
btn1:1.l
btn1:2.l
btn1:1.r
btn1:2.r
btn2:1.l
btn2:2.l
btn2:1.r
btn2:2.r