Tải bản đầy đủ - 0 (trang)
PHỤ LỤC 7: Code Arduino xử lý điểm cần đo.

PHỤ LỤC 7: Code Arduino xử lý điểm cần đo.

Tải bản đầy đủ - 0trang

Serial2.print(",");

break;

case 3:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P03");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 4:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P04");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 5:

Dithang();

delay(1000);

Quayphai();

MPU6050();

Laser_Processing();

Serial2.print("P05");

72



Serial2.print(numlaser);

Serial2.print(",");

break;

case 6:

Dithang();

delay(1000);

Quayphai();

MPU6050();

Laser_Processing();

Serial2.print("P15");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 7:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P14");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 8:

Dithang();

MPU6050();

Laser_Processing();

73



Serial2.print("P13");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 9:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P12");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 10:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P11");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 11:

Dithang();

delay(1000);

Quaytrai();

MPU6050();

74



Laser_Processing();

Serial2.print("P10");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 12:

Dithang();

delay(1000);

Quaytrai();

MPU6050();

Laser_Processing();

Serial2.print("P20");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 13:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P21");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 14:

Dithang();

75



MPU6050();

Laser_Processing();

Serial2.print("P22");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 15:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P23");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 16:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P24");

Serial2.print(numlaser);

Serial2.print(",");

case 17:

Dithang();

delay(1000);

Quayphai();

76



MPU6050();

Laser_Processing();

Serial2.print("P25");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 18:

Dithang();

delay(1000);

Quayphai();

MPU6050();

Laser_Processing();

Serial2.print("P35");

Serial2.print(numlaser);

Serial2.print(",");

case 19:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P34");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 20:

Dithang();

77



MPU6050();

Laser_Processing();

Serial2.print("P33");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 21:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P32");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 22:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P31");

Serial2.print(numlaser);

Serial2.print(",");

case 23:

Dithang();

delay(1000);

Quaytrai();

78



MPU6050();

Laser_Processing();

Serial2.print("P30");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 24:

Dithang();

delay(1000);

Quaytrai();

MPU6050();

Laser_Processing();

Serial2.print("P40");

Serial2.print(numlaser);

Serial2.print(",");

case 25:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P41");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 26:

Dithang();

79



MPU6050();

Laser_Processing();

Serial2.print("P42");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 27:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P43");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 28:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P44");

Serial2.print(numlaser);

Serial2.print(",");

case 29:

Dithang();

delay(1000);

Quayphai();

80



MPU6050();

Laser_Processing();

Serial2.print("P45");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 30:

Dithang();

delay(1000);

Quayphai();

MPU6050();

Laser_Processing();

Serial2.print("P55");

Serial2.print(numlaser);

Serial2.print(",");

case 31:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P54");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 32:

Dithang();

81



MPU6050();

Laser_Processing();

Serial2.print("P53");

break;

case 33:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P52");

Serial2.print(numlaser);

Serial2.print(",");

break;

case 34:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P51");

Serial2.print(numlaser);

Serial2.print(",");

case 35:

Dithang();

MPU6050();

Laser_Processing();

Serial2.print("P50");

Serial2.print(numlaser);

82



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

PHỤ LỤC 7: Code Arduino xử lý điểm cần đo.

Tải bản đầy đủ ngay(0 tr)

×