JBBoardのスイッチテストです。

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
jksoft
Date:
Sat May 24 00:17:11 2014 +0000
Commit message:
test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 59094f61cffe main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat May 24 00:17:11 2014 +0000
@@ -0,0 +1,31 @@
+/**
+ * Jksoft Blue mbed Board
+ *
+ * Push switch input test program
+ *
+ * Copyright (C) 2014 Junichi Katsu (JKSOFT) 
+ */
+#include "mbed.h"
+
+DigitalOut myled(LED1);
+
+DigitalIn SW1(p25);
+DigitalIn SW2(p26);
+
+int main() {
+	
+    SW1.mode(PullUp);
+    SW2.mode(PullUp);
+    
+	while(1)
+	{
+		if(SW1 == 0)
+		{
+			myled = 1;	
+		}
+		if(SW2 == 0)
+		{
+			myled = 0;	
+		}
+	}
+}
\ No newline at end of file
diff -r 000000000000 -r 59094f61cffe mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat May 24 00:17:11 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776
\ No newline at end of file