k

Dependencies:   mbed

Getswitch2Send.cpp

Committer:
Suchakhree
Date:
2015-12-09
Revision:
1:426fbd0d126a
Parent:
0:238df339023b

File content as of revision 1:426fbd0d126a:

/*
//Setup
InterruptIn switch1(D11);
InterruptIn switch2(D10);
InterruptIn switch3(D7);
void switch1();
void switch2();
void switch3();
int matrix_state=0;

      
      // int main()
      switch1.rise(&switch_1);
      switch2.rise(&switch_2);
      switch3.rise(&switch_3);
      if(matrix_state == 0){mobile.printf("#MED$"); pc.printf("#MED$");}
      else if(matrix_state == 1){mobile.printf("#TR$");  pc.printf("#TR$\n");}
      else if(matrix_state == 2){mobile.printf("#TL$");  pc.printf("#TL$\n");}
      else if(matrix_state == 3){mobile.printf("#BR$");  pc.printf("#BR$\n");}
      if(switch1 == 0 && switch2 == 0 & switch3 == 0 ) matrix_state = 0;
      
//Function     
void switch_1() 
{ 
    matrix_state=1; 
}
void switch_2() 
{
    matrix_state=2;
}
void switch_3() 
{ 
    matrix_state=3;
}*/