単輪試験機用測距センサテスト

Dependencies:   mbed

main.cpp

Committer:
manimani3712
Date:
2016-01-12
Revision:
0:8d41a47b4e29

File content as of revision 0:8d41a47b4e29:

//sensor_test

#include "mbed.h"

AnalogIn sensor(PTB2);
Serial pc(USBTX, USBRX);


int main() {
  float sensor_data;  
  pc.printf("sensortest\n");
  while(1){   
      sensor_data=sensor.read();//ジャイロ1データの読み込み
      pc.printf("sensor:%2.5f\n",sensor_data);
  }//while    
}//main