春ロボ 2班 2017
/
asimawari
主にオムニです。
Fork of asimawari by
GET_position/tyouonnpa.h@2:0a99389df632, 2017-10-25 (annotated)
- Committer:
- yuto17320508
- Date:
- Wed Oct 25 08:54:30 2017 +0000
- Revision:
- 2:0a99389df632
a
Who changed what in which revision?
User | Revision | Line number | New 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; |