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.
Diff: main.cpp
- Revision:
- 0:77e8722aa030
diff -r 000000000000 -r 77e8722aa030 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Dec 29 07:05:36 2020 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+Serial pc(USBTX, USBRX);
+Serial com(D1,D0);
+DigitalOut NRST(A5);
+int i = 0;
+char msg[256];
+
+int main()
+{
+ //初期設定
+ com.baud(115200);
+ pc.baud(115200);
+ NRST = 1;
+ NRST = 0;
+ wait(2);
+ NRST = 1;
+ com.scanf("%s",msg);//受信
+ pc.printf("%s\r\n",msg);
+ if (strstr(msg,"Select")!=NULL) {
+ com.printf("2\r\n");
+ wait(0.5);
+ com.printf("q\r\n");
+ wait(0.5);
+ com.printf("2\r\n");
+ wait(0.5);
+ com.printf("start\r\n");
+ }
+ while(1){
+ pc.printf("HEPTA\r\n");
+ com.printf("HEPTA\r\n");
+ wait(1.0);
+ }
+}
\ No newline at end of file