Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int ba = 0;
- const int bb = 1;
- const int bc = 2;
- const int bd = 3;
- const int be = 4;
- const int bf = 5;
- const int bg = 6;
- const int bh = 7;
- const int bi = 9;
- const int bj = 10;
- const int bk = 11;
- const int bl = 12;
- const int bm = 13;
- const int bn = A4;
- const int bo = A5;
- int a = 0;
- int b = 0;
- int c = 0;
- int d = 0;
- int e = 0;
- int f = 0;
- int g = 0;
- int h = 0;
- int i = 0;
- int j = 0;
- int k = 0;
- int l = 0;
- int m = 0;
- int n = 0;
- int o = 0;
- void setup() {
- pinMode(ba, INPUT);
- pinMode(bb, INPUT);
- pinMode(bc, INPUT);
- pinMode(bd, INPUT);
- pinMode(be, INPUT);
- pinMode(bf, INPUT);
- pinMode(bg, INPUT);
- pinMode(bh, INPUT);
- pinMode(bi, INPUT);
- pinMode(bj, INPUT);
- pinMode(bk, INPUT);
- pinMode(bl, INPUT);
- pinMode(bm, INPUT);
- pinMode(bn, INPUT);
- pinMode(bo, INPUT);
- Serial.begin(9600);
- }
- void loop(){
- a = digitalRead(ba);
- b = digitalRead(bb);
- c = digitalRead(bc);
- d = digitalRead(bd);
- e = digitalRead(be);
- f = digitalRead(bf);
- g = digitalRead(bg);
- h = digitalRead(bh);
- i = digitalRead(bi);
- j = digitalRead(bj);
- k = digitalRead(bk);
- l = digitalRead(bl);
- m = digitalRead(bm);
- n = digitalRead(bn);
- o = digitalRead(bo);
- if(a == HIGH)
- {
- char x[4] = "a1";
- Serial.print(x);
- }
- if(b == HIGH)
- {
- char x[4] = "b1";
- Serial.print(x);
- }
- if(c == HIGH)
- {
- char x[4] = "c1";
- Serial.print(x);
- }
- if(d == HIGH)
- {
- char x[4] = "d1";
- Serial.print(x);
- }
- if(e == HIGH)
- {
- char x[4] = "e1";
- Serial.print(x);
- }
- if(f == HIGH)
- {
- char x[4] = "f1";
- Serial.print(x);
- }
- if(g == HIGH)
- {
- char x[4] = "g1";
- Serial.print(x);
- }
- if(h == HIGH)
- {
- char x[4] = "h1";
- Serial.print(x);
- }
- if(i == HIGH)
- {
- char x[4] = "i1";
- Serial.print(x);
- }
- if(j == HIGH)
- {
- char x[4] = "j1";
- Serial.print(x);
- }
- if(k == HIGH)
- {
- char x[4] = "k1";
- Serial.print(x);
- }
- if(l == HIGH)
- {
- char x[4] = "l1";
- Serial.print(x);
- }
- if(m == HIGH)
- {
- char x[4] = "m1";
- Serial.print(x);
- }
- if(n == HIGH)
- {
- char x[4] = "n1";
- Serial.print(x);
- }
- if(o == HIGH)
- {
- char x[4] = "o1";
- Serial.print(x);
- }
- Serial.println();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement