NHK2021_ikarashiSolenoidValve
Dependents: NHK2021_ikarashiSV_code NHK2021_ikarashiSV_code_withservo 2021NHK_B_syudo
Diff: ikarashiSV.cpp
- Revision:
- 2:d08346d0178a
- Parent:
- 0:2b253298d427
diff -r 2b253298d427 -r d08346d0178a ikarashiSV.cpp --- a/ikarashiSV.cpp Mon Oct 11 07:48:12 2021 +0000 +++ b/ikarashiSV.cpp Sun Oct 17 13:08:49 2021 +0000 @@ -17,8 +17,8 @@ switch(_state) { case 1: //下だけ上がる - port_a = 0; - port_b = 1; + port_a = 1; + port_b = 0; solenoid_status = 1; break; case 2: @@ -33,8 +33,8 @@ port_d = 1; wait(0.3); - port_a = 1; - port_b = 0; + port_a = 0; + port_b = 1; solenoid_status = 0; break; } @@ -67,7 +67,7 @@ Serial pc(USBTX, USBRX,115200); -ikarashiSV slv(PB_1,PB_2,PB_15,PB_14); +ikarashiSV slv(PC_7,PB_10,PB_4,PB_5); ボタンを押したときor離したときを読み取る定義の仕方 InterruptIn button(USER_BUTTON);