mirror of
https://gitee.com/yyz_o/bk_bishe_pi.git
synced 2025-09-07 23:21:26 +00:00
2025.5.17第一次提交,包括16号和今天,在实机上,对代码修改后的结果
This commit is contained in:
22
robot_test_code/实机测试/test_psd.cpp
Normal file
22
robot_test_code/实机测试/test_psd.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include<iostream>
|
||||
#include<string>
|
||||
#include"eyebot++.h"
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
int Fwall,Lwall,Rwall,bwall;
|
||||
LCDMenu("","","","END");
|
||||
do
|
||||
{
|
||||
Fwall = PSDGetRaw(1); //检测前面侧是否有墙
|
||||
Lwall = PSDGetRaw(2); //检测左面
|
||||
Rwall = PSDGetRaw(3); //检测右面
|
||||
bwall = PSDGetRaw(4); //
|
||||
cout << "PSD L:" << Lwall << " R:" << Rwall << " F:" << Fwall << " b:" << bwall << endl; ;
|
||||
|
||||
} while (KEYRead() != KEY4);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user