Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed ros_lib_kinetic
Fork of NHK_kaida_ros0322_4 by
Uw Class Reference
超音波センサ( Ultrasonic Distance Sensor (#28015)) More...
#include <uw.h>
Public Member Functions | |
| Uw (PinName uw) | |
| コンストラクタの定義 メンバ変数の初期化を行う | |
| double | get_dist (int rank=0) |
| get_dist関数の定義 実際に超音波センサを用いて長さを測定する関数 | |
Detailed Description
超音波センサ( Ultrasonic Distance Sensor (#28015))
動作確認用プログラム
#include "mbed.h" #include "uw.h" Uw uw1(PB_0); //"DigitalInOut"のpinを宣言 DigitalOut led(LED1); //デバック用ledを宣言 int main() { printf("start\n"); while(1) { printf("%fcm\r\n",uw1.get_dist()); led = !led; wait_ms(100); } }
Definition at line 27 of file uw.h.
Constructor & Destructor Documentation
| Uw | ( | PinName | uw ) |
Member Function Documentation
Generated on Sat Jul 23 2022 10:47:54 by
1.7.2
