X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=dart%2Fdart.pde;h=52a20631894f06e8cc7fa0e408bd09e555ca9d25;hb=babbfc434be940bacf7f00de6503c2c57e1e455e;hp=1ed2a0fa9a5b976dc8a47930af9ce94d44b1404b;hpb=ab3afda24895b78472f008c61c6794cb42b2a412;p=svn42.git diff --git a/dart/dart.pde b/dart/dart.pde index 1ed2a0f..52a2063 100644 --- a/dart/dart.pde +++ b/dart/dart.pde @@ -24,25 +24,22 @@ union union16 { uint16_t uint16; }; +uint8_t zahlen[] = {115,110,46,78,51,83,82,68,99,105,41,73,35,67,50,36,113,108,44,76,49,81,114,100,98,101,37,69,34,66,102,109,111,116,52,84,47,79,57,89,106,97,33,65,42,74,38,45,112,104,40,72,48,80,0,0,103,107,43,75,39,71,70,77} ; + union union32 { byte uint8[4]; uint16_t uint16[2]; uint32_t uint32; }; - -//********************************************************************// - typedef unsigned char byte; -//********************************************************************// -/* void start_timer() { // timer 1: 2 ms TCCR1A = 0; // prescaler 1:8, WGM = 4 (CTC) - TCCR1B = 1< 0.08ms @ 16 MHz -> 1*alpha + TCCR1B = 1< 0.08ms @ 16 MHz -> 1*alpha // OCR1A = 207; // (1+207)*8 = 1664 -> 0.104ms @ 16 MHz -> 1*alpha TCNT1 = 0; // reseting timer TIMSK1 = 1<>=1) + value++; + value<<=3; + while(output>>=1) + value++; + //Serial.println(value,HEX); + byte zahl = zahlen[value]; + + byte multi = zahl >> 5; + byte base = zahl & B11111; + Serial.print(0+multi); + Serial.print("\t"); + Serial.println(0+base); + PCICR&= ~ B111; // Disable Interrupt + start_timer(); } @@ -106,7 +129,6 @@ void setup() PCMSK1=PINC_MASK & INPUT_SIG_PORTC; PCMSK2=PIND_MASK & INPUT_SIG_PORTD; PCICR|= B111; - // start_timer(); } @@ -118,6 +140,4 @@ void loop() { // Serial.Serial.println("foo"); // return; - - }