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 SBDBT arrc_mbed air
Revision 1:bf629e5bf337, committed 2022-01-18
- Comitter:
- asumamatsumura
- Date:
- Tue Jan 18 08:33:54 2022 +0000
- Parent:
- 0:b03df060dbea
- Child:
- 2:3dcf3fcb4921
- Commit message:
- add comment
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Jan 18 08:27:37 2022 +0000
+++ b/main.cpp Tue Jan 18 08:33:54 2022 +0000
@@ -7,6 +7,7 @@
DigitalIn limitB(PC_5,PullUp);
Air catch_no(PA_0);
+//↓モーター
void driveMotorS(double pwm){
PwmOut up_pin_A(PB_13);
PwmOut up_pin_B(PB_14);
@@ -23,6 +24,7 @@
up_pin_B= -pwm;
}
}
+//↓昇降
void Up(int data){
if(data==1 && !limitA){
driveMotorS(0.06);
@@ -32,6 +34,7 @@
driveMotorS(0);
}
}
+//↓回収用
void CATCH_NO(bool data){
catch_no.move(data);
}
@@ -40,10 +43,11 @@
int up;
bool catch_no=0,old_circle;
while(true){
+//↓コントローラー関係
up=ds3.up()+ds3.down();
if(old_circle<ds3.circle()) catch_no=!catch_no;
old_circle=ds3.circle();
-
+//↓関数関係
Up(up);
CATCH_NO(catch_no);
}