   }
 
 
-  for (int j = 0; j < 8; j++) {
-    int k = -(j) + 8;
+/*  for (int j = 0; j < 6; j++) {
+    //int k = -(j) + 6;
+    int k = 5 - j;
     int LED = k;
     
     brailleOn[k] = (_BrailleBinaryRep & (mask << j)) != 0;
-
+    Serial.print("the bit mask result is  ");
+    Serial.println(_BrailleBinaryRep & (mask << j));
+    Serial.print("the value of j is");
+    Serial.println(j);
+    Serial.print("the value of k is");
+    Serial.println(k);    
     if (brailleOn[k] == 1) {
           Serial.print("LED #: ");
           Serial.println(k);
-	  sendDot();
+	  sendDot(j);
     } else {
-	  sendZero();
+	  sendZero(j);
     }
-  }
-}
-
-Braille braille(LEDpins[2], 3);
+  }*/
+  for (int j = 0; j < 6; j++) {
+    int k = -(j) + 6;
+    //int k = 5 - j;
+    int LED = k;
+    
+    brailleOn[k] = (_BrailleBinaryRep & (mask >> j)) != 0;
+    Serial.print("the bit mask result is  ");
+    Serial.println(_BrailleBinaryRep & (mask >> j));
+    Serial.print("the value of j is");
+    Serial.println(j);
+    Serial.print("the value of k is");
+    Serial.println(k);    
+    if (brailleOn[k] == 1) {
+          Serial.print("LED #: ");
+          Serial.println(k);
+	  sendDot(j);
+    } else {
+	  sendZero(j);
+    }
+  }  
+}
+
+Braille braille(LEDpins[5], 3);
 
 void setup() {
   // put your setup code here, to run once:  

{
  public:
    Braille(byte pin, byte speed);
    void sendZero();
    void sendDot();
    //void sendMsg(char *str);
    void sendChar(char c);
};

  //array of 'on' bits
  char brailleOn[8];
  int LEDpins [] = {3, 5, 9, 10, 11, 13};

  byte _speed;	// Speed in WPM
  byte _pin;	// Pin to beep or toggle

  //_zerolen =  (3*_dotlen);

  // Set the pin to output mode
  int i = 0;
  int localpin;
  for (i = 0; i < 8; i++){
    localpin = LEDpins[i];
    pinMode(localpin, OUTPUT);
  }
}

void Braille::sendZero(int pinindex)
{
  digitalWrite(LEDpins[pinindex], LOW);
  //delay(300);
  //digitalWrite(_pin, LOW);
  //delay(_dotlen);
}

void Braille::sendDot(int pinindex)
{
  digitalWrite(LEDpins[pinindex], HIGH);
  //delay(300);
  //digitalWrite(LEDpins[pinindex], LOW);
  //delay(300);
}

void Braille::sendChar(char c)
