主にオムニです。

Dependencies:   EC mbed HCSR04

Fork of asimawari by yuto kawamura

Committer:
yuto17320508
Date:
Thu Oct 26 13:10:28 2017 +0000
Revision:
3:73625a6c9750
Parent:
2:0a99389df632
a

Who changed what in which revision?

UserRevisionLine numberNew contents of line
yuto17320508 2:0a99389df632 1
yuto17320508 2:0a99389df632 2 //超音波センサ値の取得
yuto17320508 2:0a99389df632 3
yuto17320508 2:0a99389df632 4
yuto17320508 2:0a99389df632 5
yuto17320508 2:0a99389df632 6
yuto17320508 2:0a99389df632 7 double get_distX()
yuto17320508 2:0a99389df632 8 {
yuto17320508 2:0a99389df632 9 wait_ms(500);
yuto17320508 2:0a99389df632 10 usensorX.start();
yuto17320508 2:0a99389df632 11 unsigned int distX = usensorX.get_dist_cm();
yuto17320508 2:0a99389df632 12 return distX;
yuto17320508 2:0a99389df632 13 pc.printf("cm:%ld¥r¥n",distX);
yuto17320508 2:0a99389df632 14 //myled = !myled;
yuto17320508 2:0a99389df632 15 }
yuto17320508 2:0a99389df632 16
yuto17320508 2:0a99389df632 17 double get_distY()
yuto17320508 2:0a99389df632 18 {
yuto17320508 2:0a99389df632 19 wait_ms(500);
yuto17320508 2:0a99389df632 20 usensorY.start();
yuto17320508 2:0a99389df632 21 unsigned int distY = usensorY.get_dist_cm();
yuto17320508 2:0a99389df632 22 return distY;
yuto17320508 2:0a99389df632 23 pc.printf("cm:%ld¥r¥n",distY);
yuto17320508 2:0a99389df632 24 //myled = !myled;
yuto17320508 2:0a99389df632 25 }
yuto17320508 2:0a99389df632 26
yuto17320508 2:0a99389df632 27
yuto17320508 2:0a99389df632 28 myled = !myled;