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.
Dependents: 2018NHK_gakugaku_robo 2018NHK_gaku_ver2
lineSensor.h
00001 #ifndef LINE_SENSOR 00002 #define LINE_SENSOR 00003 00004 #include "mbed.h" 00005 00006 00007 /** 00008 * ラインセンサ用クラス 00009 */ 00010 class lineSensor{ 00011 public: 00012 /** 00013 * デフォルトコンストラクタ 00014 */ 00015 lineSensor(PinName line_); 00016 00017 /** 00018 *ラインとの境目の位置 00019 */ 00020 void lineborder(float border_); 00021 00022 00023 /** 00024 *ラインの判別表示 00025 *1だとライン踏んでいる 00026 *0だとラインを踏んでいない 00027 */ 00028 bool getJudgment(); 00029 00030 /** 00031 *センサの値表示 00032 */ 00033 float rawlinevalue(); 00034 00035 private: 00036 AnalogIn linevalue; 00037 float line, border; 00038 Ticker assembleTicker; 00039 void lineassemble(); 00040 00041 }; 00042 00043 00044 00045 #endif
Generated on Tue Jul 12 2022 16:17:17 by
1.7.2