NHK2021_ikarashiSolenoidValve
Dependents: NHK2021_ikarashiSV_code NHK2021_ikarashiSV_code_withservo 2021NHK_B_syudo
Diff: ikarashiSV.cpp
- Revision:
- 1:696f7c0ab1bd
- Parent:
- 0:2b253298d427
- Child:
- 3:1fc2008f3a07
diff -r 2b253298d427 -r 696f7c0ab1bd ikarashiSV.cpp --- a/ikarashiSV.cpp Mon Oct 11 07:48:12 2021 +0000 +++ b/ikarashiSV.cpp Fri Oct 15 07:58:20 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,9 +67,9 @@ 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離したときを読み取る定義の仕方 +//ボタンを押したときor離したときを読み取る定義の仕方 InterruptIn button(USER_BUTTON); void add()