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 move3wheel
Diff: User.cpp
- Revision:
- 15:c5258a4dee75
- Parent:
- 14:5c92c3c78290
- Child:
- 16:55c180a4338c
--- a/User.cpp Fri Apr 21 04:43:43 2017 +0000
+++ b/User.cpp Sat Apr 29 11:48:36 2017 +0000
@@ -10,7 +10,6 @@
//これより下に関数外に書く要素を記入する
PwmOut led1(LED1);
PwmOut led2(LED2);
-DigitalOut led2(LED2);
DigitalOut led3(LED3);
DigitalOut led4(LED4);
@@ -41,21 +40,24 @@
ButtonState = ((ps3report*)(data + 1))->ButtonState;
}
//ここより下にプログラムを書く
- //データ取得例
+
+ //データ取得例
if((ButtonState >> BUTTONCIRCLE)&1 == 1) {
- led2 = 1;
+ led1 = 1;
//○が押されたとき
}else{
- led2 = 0;
+ led1 = 0;
+ //○を押してないとき
}
-
-
led1=LSX/256.0f;
led2=LSY/256.0f;
led3=ButtonState & 0x0400; //L1の状態
led4=ButtonState & 0x0800; //R1の状態
//値の取得はps3.hを参照
+ //ここまでプログラム例 実機に乗せるときは消して大丈夫です
+
+
}
\ No newline at end of file