From d97a5aa7936fbcfae76542648d1d7621c2be63cc Mon Sep 17 00:00:00 2001 From: Eve Entropia Date: Tue, 18 May 2010 23:14:15 +0200 Subject: [PATCH] charlieplexing --- projekte/charlieplexing/eagle/4pins.sch | Bin 0 -> 10376 bytes projekte/charlieplexing/eagle/eagle.epf | 2 + .../sketch_may18a/sketch_may18a.pde | 32 +++++++++++++++ .../sketch_may18b/sketch_may18b.pde | 38 ++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 projekte/charlieplexing/eagle/4pins.sch create mode 100644 projekte/charlieplexing/eagle/eagle.epf create mode 100644 projekte/charlieplexing/sketch_may18a/sketch_may18a.pde create mode 100644 projekte/charlieplexing/sketch_may18b/sketch_may18b.pde diff --git a/projekte/charlieplexing/eagle/4pins.sch b/projekte/charlieplexing/eagle/4pins.sch new file mode 100644 index 0000000000000000000000000000000000000000..029a829db725c3a53c3190cc10dae16ec0fac13d GIT binary patch literal 10376 zcmbVS4RBo5bv`S}vb2`8vh4LQmY!wH61HVOX)PnDur2w&Sh7a4T^hjluCzj1B(2b{ zz!kd*40x+;i@^_r859&upWI14PrN7qrlE^2$s)U_CXyVC&zWDG$(Z z*JZv}u;uU@B}6m*6(3$fq*x6-{S?Z}>mQu`_gjB@@S*jyC=@6U6o}qk$zgpti>k^4 z0km*RTQZ$a4)P`QXU+`dxiED`dsEIe;}sPK-;;=X_^erhLgDWo8cB|(F70mGL**Fr9YCl(5RnrXL;GxCU`JO-1TM|QwRKH_S_2NPgj~P6)WNCq?C%u); zM`vu$(j`9q1`pLNGvi9{il@>pe_4&eV+Ie^*3IzdPx`iae3&B){dKi7y!jI|c<9FE zLBsE2{UeEv1ijrVqieWF;rh~@NLNfC%kM=Xw|Af zzWBMF>4~Ac;fK)b)rQ|5kETXPxC!I7ZSYOWo>88m7+0vFAy6uMy5fEDk@!$gobkp+ z!|y%Nrzwm_)|h#lh9cLWYa)gpGk9s!+G1b4IyUXw+Oes17A;!aRBZgin2T36-(>XM zA0KhT1v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;Hl};C&e*;3jOdu)(4CmQtUx| zulB$ANBEdq;vZ=bKl$~*&y(WCeh?m{UytC(BflQxT`qfs2MM2wJ%S_8{Cbe@x$F@h zr078$XH3DD@j{-MW&FnP(Q@jSaX|`y@;a>dTD=bcMbXjH$#E=T{ki;rIO3cDdmtr_ zus;`Hc#uUu*L;aD+QUx29*irO9^pZX9{3IGUM@b?HTV}&^rK&?i$1X*>szjPVa`Ag zq+gHJMW4(E!O_OgmpbxGaLM0X_Jfc3NjtF<`J2m5=mp=ee^$j)^WS0RHCt*rR@Zc| zs@Yi6RV)`IZ@s7`wvPW(BauocM_N|L)&<+5sYH*J>gkUUM$>#1ABf}MDN z+&S56>_+E;4dC--%IUm2&AmiNdVk0Mn+6A0S`mC18_ zem!k%9*Fm(N0LK{o|M&n+ivR?Yva!LdfRSlyxFS5Ad~6-_(yCPR6~C%v zAGvP{VP?zlx?oR#VmS9;Hnw)QZrsi<6tk!;Z5UNcl!lLe#od-v=+5#JqdQ184W z!G-hAlrNljp|qpOI$XnR8b8ldZ@e!$I*{foetEPp{)lt&JAD1>%uA1cc5LwL(Bo{; zn2Fb`V4(OMc?vK!uUEmMckeX{csIXp1&@cH40smswtU?R)<64KM!~e-LxFwhPNM)% cx7X`~d#8071^lFO-3q$?`#9mh1-U8xKd{#Mg8%>k literal 0 HcmV?d00001 diff --git a/projekte/charlieplexing/eagle/eagle.epf b/projekte/charlieplexing/eagle/eagle.epf new file mode 100644 index 0000000..b2b33d6 --- /dev/null +++ b/projekte/charlieplexing/eagle/eagle.epf @@ -0,0 +1,2 @@ +[Eagle] +Version="05 07 00" \ No newline at end of file diff --git a/projekte/charlieplexing/sketch_may18a/sketch_may18a.pde b/projekte/charlieplexing/sketch_may18a/sketch_may18a.pde new file mode 100644 index 0000000..e56cf89 --- /dev/null +++ b/projekte/charlieplexing/sketch_may18a/sketch_may18a.pde @@ -0,0 +1,32 @@ +const int pins[] = {2, 3, 4}; + +void setup() { + for(int p=0; p<=2; p++) { + pinMode(pins[p], INPUT); + } +} + +const int charlieplexed[6][3] = +{ + { 1,0,-1}, + { 0,1,-1}, + {-1,1, 0}, + {-1,0, 1}, + {1,-1, 0}, + {0,-1, 1}, +}; + +void loop() { + for(int i=0; i<=5; i++) { + // set pin tristate + for(int p=0; p<=2; p++) { + if (charlieplexed[i][p] == -1) { + pinMode(pins[p], INPUT); + } else { + pinMode(pins[p], OUTPUT); + digitalWrite(pins[p], charlieplexed[i][p]); + } + } + delay(200); + } +} diff --git a/projekte/charlieplexing/sketch_may18b/sketch_may18b.pde b/projekte/charlieplexing/sketch_may18b/sketch_may18b.pde new file mode 100644 index 0000000..ccbec3d --- /dev/null +++ b/projekte/charlieplexing/sketch_may18b/sketch_may18b.pde @@ -0,0 +1,38 @@ +const int pins[] = {2, 3, 4, 5}; + +void setup() { + for(int p=0; p<=2; p++) { + pinMode(pins[p], INPUT); + } +} + +const int charlieplexed[12][4] = +{ + { 1,0,-1, -1}, + { 0,1,-1, -1}, + {-1,1, 0, -1}, + {-1,0, 1, -1}, + {-1,-1,1, 0}, + {-1,-1,0, 1}, + {1,-1, 0, -1}, + {0,-1, 1, -1}, + {-1,1,-1, 0}, + {-1,0,-1, 1}, + {1,-1,-1, 0}, + {0,-1,-1, 1}, +}; + +void loop() { + for(int i=0; i<=11; i++) { + // set pin tristate + for(int p=0; p<=3; p++) { + if (charlieplexed[i][p] == -1) { + pinMode(pins[p], INPUT); + } else { + pinMode(pins[p], OUTPUT); + digitalWrite(pins[p], charlieplexed[i][p]); + } + } + delay(200); + } +}