春ロボ 2班 2017
/
asimawari
主にオムニです。
Fork of asimawari by
GET_position/photo.h
- Committer:
- yuto17320508
- Date:
- 2017-10-26
- Revision:
- 3:73625a6c9750
- Parent:
- 2:0a99389df632
File content as of revision 3:73625a6c9750:
//フォトインタラプタ上 InterruptIn photo_1(); //フォトインタラプタ下 InterruptIn photo_2(); //フラグ int right_flag=1; int left_flag=1; //フォトトランジスタのフラグ呼び出し void photo_1_rise()//右に平行移動しない { right_flag=0; } void photo_1_fall()//右に平行移動する { right_flag=1; } void photo_2_rise()//左に平行移動しない { left_flag=0; } void photo_2_fall()//左に平行移動する { left_flag=1; } //フォトインタラプタ1 photo_1.rise(&photo_1_rise); photo_1.fall(&photo_1_fall); //フォトインタラプタ2 photo_2.rise(&photo_2_rise); photo_2.fall(&photo_2_fall);