Esempio n. 1
0
void IntroScreen::begin( LiquidCrystal &_lcd ) {
	_lcd.noBlink();
	_lcd.clear();
	_lcd.print("Time Lapse");
	_lcd.setCursor(0, 1);
	_lcd.print("Controller");
}
Esempio n. 2
0
void loop()
{
      val=encoder/faktor;
 
      if (val < minimum)
            {val=minimum;
             encoder=minimum*faktor;}
    
      if (val > maximum)
            {val=maximum;
             encoder=maximum*faktor;}

  if (val !=val_old)
   { 
    // Serial.print (encoder);
    // Serial.print (" ");
    // Serial.print (val);
    // Serial.print (" ");
     
      val_old=val;
      
         sprintf(buffer,"%3d",val);
         digitalWrite(stepper_enable, LOW);
        
         lcd.setCursor(10, 2);
         lcd.print(buffer);
       
       //lcd.cursorTo(1, 10); 
      // lcd.printIn(buffer);
      
        stepper.step(100);

   } 


digitalWrite(stepper_enable, HIGH);
          if (abs (val - stepper_position) >10)
          { lcd.setCursor(19, 3);
            lcd.blink();}
         
          stepper.step(val - stepper_position);
         
          lcd.noBlink();
   
digitalWrite(stepper_enable, LOW);
stepper_position=val;
}
Esempio n. 3
0
// Allows the user to choose whether they want to use
//		a default heating curve or define their own curve
// Returns the user's choice
boolean CurveInput::chooseCurve()
{
	printWelcome(WELCOME_DURATION);
	printCurveChoices();
	lcd.blink(); // show cursor
	byte buttonID = NONE;
	while ( buttonID != SELECT ) // any button other than SELECT
	{
		buttonID = btn.waitForButton();
		btn.actionNavigate(buttonID, CURVE_CHOICE_DURATION,
						   &col, &row, 0, 0, 0, 1); // up/down choice
								// between default (A) and user
								// defined curve (B)
	}
	lcd.noBlink();
	return row; // Choice will either be top (Defaut)
		// or bottom row (User-Defined)
}
Esempio n. 4
0
void StatsScreen::begin( LiquidCrystal &_lcd ) {
	drawScreen(_lcd);
	_lcd.noBlink();
}