 }
 
 void printDec(uint32_t ui) {
-  mySerial.print(ui/10, DEC);
-  mySerial.print(".");
-  mySerial.print(ui%10, DEC);
+  Serial.print(ui/10, DEC);
+  Serial.print(".");
+  Serial.print(ui%10, DEC);
 }
 
 

  analogReference(INTERNAL1V5);
  analogRead(TEMPSENSOR); // first reading usually wrong

  mySerial.begin();
  pinMode(PUSH2, INPUT_PULLUP);   

  digitalWrite(RED_LED, HIGH); 
  digitalWrite(GREEN_LED, LOW); 


  mySerial.print("\n\n\n*** MSP430 Thermometer \n"); 
  mySerial.print("Press PUSH2 to end\n"); 
  mySerial.print("instant\taverage\n");

  for (j=0; j<NUMBER; j++) values[j]=0;
  average = 0;

//   Rei VILO, Mar 13, 2012 - More precise algorithm
//   Rei VILO, Mar 14, 2012 - Average
//   Rei VILO, May 21, 2012 - Updated with GREEN_LED, RED_LED and PUSH2
//   Rei VILO, Sep 09, 2012 - TimerSerial.h no longer required
//   Press push 2 to end
//   Tested on msp430g2452 and msp430g2553
//   2196 bytes

// RED_LED, GREEN_LED, TEMPSENSOR, PUSH2 already defined
#define NUMBER 4 // take number / 2

int ledState = HIGH;
uint8_t i = 0;
uint32_t average = 0;
