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.
Dependencies: mbed 2019ROBOKONmanualProgram
Revision 7:59b18749a41b, committed 2019-10-08
- Comitter:
- shina
- Date:
- Tue Oct 08 06:25:20 2019 +0000
- Parent:
- 6:2675289c6463
- Commit message:
- NHK2019 team A manual robot program 10/6
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sun Oct 06 00:48:42 2019 +0000
+++ b/main.cpp Tue Oct 08 06:25:20 2019 +0000
@@ -89,6 +89,7 @@
int r=6;
int s=5;
bool x=0;
+bool y=0;
//関数プロトタイプ宣言
@@ -696,6 +697,17 @@
send_data(0x24,data7);
*/
}else if(x==1){
+ data7=0xff;
+ get_data_rs232=get_data_rs232 & 0b11011111;
+ while(!(get_data_rs232 & 0x20)){
+ send_data(0x24,data7);
+ get_data_rs232=slave.getc();
+ }
+ data7=0x10;
+ send_data(0x24,data7);
+ x=0;
+
+ /*
data_servo=0x08;
send_data(0x18,data_servo);
wait(1.2);
@@ -708,11 +720,18 @@
data7=0x10;
send_data(0x24,data7);
x=0;
-
+ */
+ }
}
- }/*else if(triangle!=old_triangle){
+ }else if(triangle!=old_triangle){
+ old_triangle=triangle;
if(triangle==1&&select==0){
-
+ if(y==0){
+ data_servo=0x08;
+ send_data(0x18,data_servo);
+ y=1;
+ //wait(1.2);
+ /*
data_servo=0x07;
send_data(0x18,data_servo);
wait(1.2);
@@ -732,7 +751,14 @@
}
data7=0x10;
send_data(0x24,data7);
- }*/
+ */
+ }else if(y==1){
+ data_servo=0x07;
+ send_data(0x18,data_servo);
+ y=0;
+ //wait(1.2);
+ }
+ }
}
}
}