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
Revision 3:65eaf88bf278, committed 2016-05-15
- Comitter:
- SES01
- Date:
- Sun May 15 00:50:05 2016 +0000
- Parent:
- 2:c77482250d0b
- Child:
- 4:614e752487cc
- Commit message:
- 7?????MB??????; ??????????????????????????????????; ??????????
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat May 14 12:23:29 2016 +0000
+++ b/main.cpp Sun May 15 00:50:05 2016 +0000
@@ -31,8 +31,10 @@
*/
Serial comPort(dp16, dp15);
-DigitalOut driverEnable(dp28);
-DigitalOut LED(dp24);
+DigitalOut driverEnable(dp7);
+DigitalOut LED1(LED1);
+DigitalOut LED2(LED2);
+BusIn switch5(dp4, dp6, dp18, dp25, dp26);
//dp5 = ハイサイドPWM1, dp27 = ハイサイドPWM2 (オープンドレイン)
//dp1 = ローサイドPWM1, dp2 = ローサイドPWM2
PwmOut Low_A(dp1);
@@ -40,7 +42,9 @@
DigitalOut High_A(dp5);
DigitalOut High_B(dp27);
-AnalogIn ain(dp4);
+AnalogIn ain(dp9);
+//PortIn encoder(Port0, 0b111);
+
//グローバル変数
uint8_t lastRXdata = 0;
@@ -109,11 +113,14 @@
High_A = 0;
High_B = 0;
-
Low_A.period_us(FP_MD);
Low_A.write(0);
Low_B.period_us(FP_MD);
Low_B.write(0);
+
+ switch5.mode(PullUp);
+ address = switch5.read();
+ comPort.printf("%d", address);
//初期設定完了
LED = 1;