diff options
| author | Jörg Biemann <joerg@Jorgs-MacBook-Pro.local> | 2012-07-28 01:11:05 +0200 |
|---|---|---|
| committer | Jörg Biemann <joerg@Jorgs-MacBook-Pro.local> | 2012-07-28 01:11:05 +0200 |
| commit | dd52319fde91fd078463abf501c25460810fbd64 (patch) | |
| tree | ba3cebbc3480e664f7569526eafafe1d66733822 | |
| parent | f7721742d23d8a9ba1df7837fba5931f99aa63ce (diff) | |
Hier kann man Bitmuster testen.
Signed-off-by: Jörg Biemann <joerg@Jorgs-MacBook-Pro.local>
| -rw-r--r-- | Bitmustertest/Bitmustertest/Bitmustertest.ino | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/Bitmustertest/Bitmustertest/Bitmustertest.ino b/Bitmustertest/Bitmustertest/Bitmustertest.ino new file mode 100644 index 0000000..aa312ec --- /dev/null +++ b/Bitmustertest/Bitmustertest/Bitmustertest.ino @@ -0,0 +1,115 @@ + +int bitMuster0[] = { + 0,0,0,0,0,0,0,0,2}; +int bitMuster1[] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2}; +int bitMuster2[] = { + 0,0,0,0,0,0,1,0,0,0,0,0,0,1,2}; +int bitMuster3[] = { + 0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,2}; +int bitMuster4[] = { + 0,1,1,1,0,1,1,1,2}; +int bitMuster5[] = { + 1,1,1,1,1,1,1,1,2}; + + +const int ledPin = 2; + +int laengeMuster0; +void setup (){ + laengeMuster0 = sizeof bitMuster0; + pinMode(ledPin,OUTPUT); + + +} + +void loop(){ + for(int j=0;j<10000;j++){ + int i=0; + while(bitMuster0[i]!=2){ + if(bitMuster0[i]){ + digitalWrite(ledPin, HIGH); + } + else{ + digitalWrite(ledPin,LOW); + } + i++; + } + + } + + for(int j=0;j<10000;j++){ + int i=0; + while(bitMuster1[i]!=2){ + if(bitMuster1[i]){ + digitalWrite(ledPin, HIGH); + } + else{ + digitalWrite(ledPin,LOW); + } + i++; + } + + } + + for(int j=0;j<10000;j++){ + int i=0; + while(bitMuster2[i]!=2){ + if(bitMuster2[i]){ + digitalWrite(ledPin, HIGH); + } + else{ + digitalWrite(ledPin,LOW); + } + i++; + } + + } + for(int j=0;j<10000;j++){ + int i=0; + while(bitMuster3[i]!=2){ + if(bitMuster3[i]){ + digitalWrite(ledPin, HIGH); + } + else{ + digitalWrite(ledPin,LOW); + } + i++; + } + + } + for(int j=0;j<10000;j++){ + int i=0; + while(bitMuster4[i]!=2){ + if(bitMuster4[i]){ + digitalWrite(ledPin, HIGH); + } + else{ + digitalWrite(ledPin,LOW); + } + i++; + } + + } + for(int j=0;j<10000;j++){ + int i=0; + while(bitMuster5[i]!=2){ + if(bitMuster5[i]){ + digitalWrite(ledPin, HIGH); + } + else{ + digitalWrite(ledPin,LOW); + } + i++; + } + + } + + + + +} + + + + |
