Advertisement
RuiViana

Teste_matriz

Jul 10th, 2016
3,622
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. byte velha [8][8] = {
  4.   {0, 0, 1, 0, 0, 1, 0, 0},
  5.   {0, 0, 1, 0, 0, 1, 0, 0},
  6.   {1, 1, 1, 1, 1, 1, 1, 1},
  7.   {0, 0, 1, 0, 0, 1, 0, 0},
  8.   {0, 0, 1, 0, 0, 1, 0, 0},
  9.   {1, 1, 1, 1, 1, 1, 1, 1},
  10.   {0, 0, 1, 0, 0, 1, 0, 0},
  11.   {0, 0, 1, 0, 0, 1, 0, 0}
  12. };
  13. //-----------------------------------
  14. void setup()
  15. {
  16.  Serial.begin(9600);
  17.   }
  18. //------------------------------
  19. void loop() {
  20.  
  21.   Serial.println( velha[2][2],HEX);
  22.   Serial.println( velha[2][4],HEX);
  23.   Serial.println( velha[3][3],HEX);
  24.   Serial.println( velha[0][2],HEX);
  25.   Serial.println( velha[1][1],HEX);
  26.   Serial.println( " ");
  27.   velha[2][2] = 0;
  28.   velha[2][4] = 0;
  29.   velha[3][3] = 0;
  30.   velha[0][2] = 0;
  31.   velha[1][1] = 0;
  32.   Serial.println( velha[2][2],HEX);
  33.   Serial.println( velha[2][4],HEX);
  34.   Serial.println( velha[3][3],HEX);
  35.   Serial.println( velha[0][2],HEX);
  36.   Serial.println( velha[1][1],HEX);
  37.   Serial.println( " ");
  38.   while(1){}
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement