示例#1
0
void LCDScreen::denaturization()
{
  lcd.clear();
  lcd.setCursor( 0, 0 );
  lcd.print("Denaturization? ");
  lcd.setCursor( 0, 1 );
  lcd.print("Yes     No");
  lcd.setCursor( 0, 1 );
  lcd.blink();
  uint8_t buttons;
  while(true){
    buttons = lcd.readButtons();
    if (buttons & BUTTON_LEFT){
     lcd.setCursor( 0, 1 );
     denat = 1;
    }
    if (buttons & BUTTON_RIGHT){
     lcd.setCursor( 8, 1 );
     denat = 0;
    }
    if (buttons & BUTTON_SELECT){
     lcd.noBlink();
     break;
    }
  }
}
示例#2
0
void LCDScreen::updateArrow( double temp )
{
  lcd.home();
  lcd.print( tempFloor );
  
  if ( temp < tempFloor ) temp = tempFloor;
  
  int n; //number of spaces to create
  if ( tempFloor > 99 && tempCeil > 99 ) n = 9;
  else if ( tempFloor > 99 && tempCeil <= 99 ) n = 10;
  else if ( tempFloor <= 99 && tempCeil > 99 ) n = 10;
  else n = 11;  
  
  int newTemp = map( temp, tempFloor, tempCeil, 0, n );
  
  for ( int o = 0; o < newTemp; o++ )
  {
    lcd.print( "-" );
  }
  lcd.print( ">" );
  for ( int o = 0; o < ( n - newTemp); o++ )
  {
    lcd.print( " " );
  }

  lcd.print( tempCeil );
}
示例#3
0
void LCDScreen::dispUserPrefCycles()
{
  lcd.clear();
  lcd.setCursor( 0, 0 );
  lcd.print( "# of cycles: " );
  lcd.setCursor( 0, 15 );
  lcd.print( maxCycles );
}
示例#4
0
void LCDScreen::finalMess()
{
  lcd.clear();
  lcd.home();
  lcd.print( "PCR complete." );
  lcd.setCursor( 0, 1 );
  lcd.print( "RESET to cont." );

}
示例#5
0
void LCDScreen::dispUserPrefHighLow()
{
  lcd.clear();
  lcd.home();
  lcd.print( "High: " );
  lcd.print( tempCeil );
  lcd.setCursor( 0, 1 );
  lcd.print( "Low:  " );
  lcd.print( tempFloor );
}
示例#6
0
void LCDScreen::setup() {

  lcd.begin( 16, 2 );
  lcd.home();
  lcd.print( "PCR V.2 - O.V.L.");
  lcd.setCursor( 0, 1 );
  lcd.print( "SELECT to cont." );
  waitForSelect();  
  delay( 500 );
  setUserInputs();
  delay( 500 );

}
示例#7
0
void LCDScreen::displayInitialStatus( double temp, int current_cycle ) {

  lcd.clear();
  lcd.home();
  
  updateArrow( temp );
  
  lcd.setCursor( 0, 1 );
  lcd.print( "Cycle no. " );
  lcd.print( current_cycle );
  lcd.print( "/" );
  lcd.print( maxCycles );


}
示例#8
0
void LCDScreen::printError( int mess )
{
  lcd.clear();
  lcd.home();
  
  String message;
  if ( mess == 1 ) { message = "ERR: Overheating"; }
  else if ( mess < 1 ) { message = "ERR: Not ramping"; }
  else { message = "ERR: wrap failed"; }

  lcd.print( message );

  lcd.setCursor( 0, 1 );
  lcd.print( "Check hardware" );
}
示例#9
0
void LCDScreen::dispDenatStatus(long int currentTime, long int stopTime)
{
  int minLeft;
  lcd.clear();
  lcd.setCursor( 0, 1 );
  if(currentTime == 0 && stopTime == 0){
    lcd.print("Ramping Up");
  }
  else{
  minLeft = (stopTime - currentTime) / 60000;
  lcd.print(minLeft);
  lcd.setCursor(2,1);
  lcd.print("min left");  
  }
    
}
void K3NGdisplay::redraw(){

  // redraw the screen with the current screen_buffer_live

  for (int x = 0;x < (display_columns*display_rows);x++){   
    lcd.setCursor(Xposition(x),Yposition(x));
    if (screen_buffer_attributes_live[x] & ATTRIBUTE_BLINK){  // does this character have the blink attribute
      if (current_blink_state){
        lcd.print(screen_buffer_live[x]);
      } else {
        lcd.print(' ');
      }
    } else {
      lcd.print(screen_buffer_live[x]);
    }
  }


}	
void K3NGdisplay::update(){

  // update the screen with changes that are pending in screen_buffer_pending


  for (int x = 0;x < (display_columns*display_rows);x++){  	
    if (screen_buffer_live[x] != screen_buffer_pending[x]){  // do we have a new character to put on the screen ?
      lcd.setCursor(Xposition(x),Yposition(x));
      if (screen_buffer_attributes_pending[x] & ATTRIBUTE_BLINK){  // does this character have the blink attribute
        if (current_blink_state){
          lcd.print(screen_buffer_pending[x]);
        } else {
          lcd.print(' ');
        }
      } else {
        lcd.print(screen_buffer_pending[x]);
      }
      screen_buffer_live[x] = screen_buffer_pending[x];
      screen_buffer_attributes_live[x] = screen_buffer_attributes_pending[x];
    } else {  // not a new character, do we have live character on the screen to blink?
      if (last_blink_state != current_blink_state){
        if (screen_buffer_attributes_live[x] & ATTRIBUTE_BLINK){
        	lcd.setCursor(Xposition(x),Yposition(x));
        	if (current_blink_state){
              lcd.print(screen_buffer_live[x]);
      	    } else {
      	      lcd.print(' ');
      	    }
        }
      }
    }
  }

  last_blink_state = current_blink_state;

}
示例#12
0
void log(String message) {
  lcd.setCursor(0, 0);
  lcd.print(message + String(" "));
  delay(1000);
}