![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
MBed program for TR1 functions
Dependencies: mbed Servo ros_lib_melodic DC_Stepper_Controller_Lib
Diff: main.cpp
- Revision:
- 1:fbdbf4ac12c6
- Parent:
- 0:1bf7e0755f40
- Child:
- 2:e570143bf35e
diff -r 1bf7e0755f40 -r fbdbf4ac12c6 main.cpp --- a/main.cpp Wed Jun 02 01:14:08 2021 +0000 +++ b/main.cpp Wed Jun 02 13:53:04 2021 +0000 @@ -29,10 +29,10 @@ DigitalOut right = D4; // DC motor 2 (via L298N control pin 2) //AnalogOut left = A0; // DC motor 1 (via L298N control pin 1) //AnalogOut right = A1; // DC motor 2 (via L298N control pin 2) -DigitalOut lock = D15; // 電磁石 +DigitalOut lock = D14; // 電磁石 DigitalOut back = A4; // pin 3 of faulhaber DigitalOut eject_1 = D10; // valve 1 -DigitalOut eject_2 = D3; // valve 2 +DigitalOut eject_2 = D5; // valve 2 //DigitalOut savePos = D0; savepos by back=1 & up=1 & down=1 DigitalIn firing = D3; @@ -308,14 +308,14 @@ if(button == 1) { myled = 0; - down = 1; up = 0; + down = 0; up = 1; back = 1; start = 1; while(button == 1); } if(firing.read() == 1 && start == 1) { up = 0; - down = 1; + down = 1; back = 1; while(firing.read() == 1); wait(0.3);