Last change
on this file since 394 was 136, checked in by ertl-honda, 9 years ago |
ライブラリとOS及びベーシックなサンプルの追加.
|
File size:
695 bytes
|
Line | |
---|
1 | #include <ArduinoRobot.h>
|
---|
2 |
|
---|
3 | bool RobotControl::isActionDone(){
|
---|
4 | if(messageIn.receiveData()){
|
---|
5 | if(messageIn.readByte()==COMMAND_ACTION_DONE){
|
---|
6 | return true;
|
---|
7 | }
|
---|
8 | }
|
---|
9 | return false;
|
---|
10 | }
|
---|
11 |
|
---|
12 | void RobotControl::pauseMode(uint8_t onOff){
|
---|
13 | messageOut.writeByte(COMMAND_PAUSE_MODE);
|
---|
14 | if(onOff){
|
---|
15 | messageOut.writeByte(true);
|
---|
16 | }else{
|
---|
17 | messageOut.writeByte(false);
|
---|
18 | }
|
---|
19 | messageOut.sendData();
|
---|
20 | }
|
---|
21 |
|
---|
22 | void RobotControl::lineFollowConfig(uint8_t KP, uint8_t KD, uint8_t robotSpeed, uint8_t intergrationTime){
|
---|
23 | messageOut.writeByte(COMMAND_LINE_FOLLOW_CONFIG);
|
---|
24 | messageOut.writeByte(KP);
|
---|
25 | messageOut.writeByte(KD);
|
---|
26 | messageOut.writeByte(robotSpeed);
|
---|
27 | messageOut.writeByte(intergrationTime);
|
---|
28 | messageOut.sendData();
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.