- void setup() {
- // put your setup code here, to run once:
- Serial.begin(9600);
- Serial.println("x : ");
- while(Serial.available() == 0){}
- int x ;
- x = Serial.parseInt();
- Serial.println("y : ");
- while(Serial.available() == 0){}
- int y ;
- y = Serial.parseInt();
- Serial.println(' ');
- Serial.println(x);
- Serial.println(y);
- int mylist[x][y];
- for(int xi = 0 ; xi<x ; xi++){
- for(int yi =0 ; yi < y ; yi++){
- Serial.print('x');
- Serial.print(xi);
- Serial.print('y');
- Serial.println(yi);
- while(Serial.available() == 0){}
- mylist[xi][yi] = Serial.parseInt();
- } }
- Serial.println("Resalt");
- for(int xi = 0 ; xi<x ; xi++){
- for(int yi =0 ; yi < y ; yi++){
- Serial.print('x');
- Serial.print(xi);
- Serial.print('y');
- Serial.println(yi);
- Serial.println(mylist[xi][yi]);
- } }
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
Recent Pastes