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.
Revision 0:be12da84ab46, committed 2016-09-30
- Comitter:
- nakano_han
- Date:
- Fri Sep 30 02:11:47 2016 +0000
- Child:
- 1:2ef828f7055a
- Commit message:
- LCD???;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Fri Sep 30 02:11:47 2016 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/simon/code/TextLCD/#308d188a2d3a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Sep 30 02:11:47 2016 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+#include "TextLCD.h"
+
+TextLCD lcd(D8,D10,D11,D12,D13,D14); // rs, e, d4, d5, d6, d7)
+AnalogIn sw1(A5);
+AnalogIn sw2(A4);
+
+int main()
+{
+ char c = 0; //SWのカウント数
+
+
+
+ lcd.cls(); //画面をリセット
+
+ lcd.locate(0,0); //表示座標
+ lcd.puts("push switch"); //表示文字
+
+ lcd.locate(0,1); //表示座標
+ lcd.puts("00"); //表示文字
+
+ while(1) //無限ループ
+ {
+ if(sw1 == 1) //SWが押されると{}内を実行
+ {
+ wait(0.05); //チャタリング除去
+ c++; //カウント値に1足す
+
+ if(c > 99) //カウント値が99になったとき{}内実行
+ {
+ c = 0; //カウント値初期化
+ }
+
+ lcd.locate(0,1); //表示座標
+ lcd.putc((c / 10) % 10 + '0'); //表示文字
+
+ lcd.putc((c / 1) % 10 + '0'); //表示文字
+ }
+ //lcd.cls();
+ //sw1 == 0; //新しきものもいずれ古くなる
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Sep 30 02:11:47 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/b0220dba8be7 \ No newline at end of file