summaryrefslogtreecommitdiffstats
path: root/Matrix_5x6/Charlie
diff options
context:
space:
mode:
authorAlexander Kauerz <kauerz@informatik.uni-luebeck.de>2011-11-04 18:08:59 +0100
committerAlexander Kauerz <kauerz@informatik.uni-luebeck.de>2011-11-04 18:08:59 +0100
commit4d6c389b1681bda08ce82a64c353cf9f4fda4554 (patch)
tree63aa2092da9f4a4acf9b9f6539c24d276f31d68b /Matrix_5x6/Charlie
parent7145c8da5a552a59ca35a252daa9f7d578d1208d (diff)
downloadledmatrix-4d6c389b1681bda08ce82a64c353cf9f4fda4554.tar
ledmatrix-4d6c389b1681bda08ce82a64c353cf9f4fda4554.zip
Charlie kann mit zwei LEDs blinken.
Diffstat (limited to 'Matrix_5x6/Charlie')
-rw-r--r--Matrix_5x6/Charlie/Charlie.pde22
1 files changed, 22 insertions, 0 deletions
diff --git a/Matrix_5x6/Charlie/Charlie.pde b/Matrix_5x6/Charlie/Charlie.pde
new file mode 100644
index 0000000..9ecc80d
--- /dev/null
+++ b/Matrix_5x6/Charlie/Charlie.pde
@@ -0,0 +1,22 @@
+#include <Charlieplex.h>
+
+#define NUMBER_OF_PINS 6
+byte pins[] = {2,3,4,5,6,7};
+Charlieplex charlieplex = Charlieplex(pins,NUMBER_OF_PINS);
+
+charliePin led0 = { 0 , 1 };//HIGH when current flows from 2 to 3
+charliePin led1 = { 1 , 0 };//HIGH when current flows from 3 to 2
+
+boolean singleOn = false;
+int wait = 500;
+
+void setup(){ /*nothing*/ }
+
+void loop(){
+ charlieplex.charlieWrite(led0,HIGH);
+ delay(wait);
+ charlieplex.charlieWrite(led1,HIGH);
+ delay(wait);
+ charlieplex.clear();
+ delay(wait);
+}