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
Diff: main.cpp
- Revision:
- 2:e8e6fb8285d9
- Parent:
- 1:f08cfb821949
--- a/main.cpp Sat Nov 17 06:44:31 2018 +0000
+++ b/main.cpp Thu Dec 13 20:33:55 2018 +0000
@@ -1,17 +1,23 @@
#include "mbed.h"
-DigitalIn flight(p22); //フライトピン
+DigitalIn flight(p23); //フライトピン
+DigitalOut SW(p22); //トリガー用
DigitalOut FET(p21); //FET
int main() {
- FET = 0;
+ FET = 0;
+ SW = 1; //p23をhigh(3.3V)にする。
while(1) {
if(flight==1) {
wait(10);
}
else{
- FET = 0; //FET、ニクロム線切断
+ if(flight==1) {
+ wait(10);
+ }
+ else{
+ FET = 0; //FET、ニクロム線切断
wait(20);
FET = 1;
wait(12);
@@ -20,7 +26,9 @@
FET = 1;
wait(12);
FET = 0;
+ SW = 0; //p23をlow(0V)にする。
break;
}
}
+ }
}
\ No newline at end of file