void TScreen::Begin() { // Initialize the touch screen myTouch.InitTouch(); myTouch.setPrecision(PREC_MEDIUM); if (!welcome) Welcome(); // do not modify after //Activate and display screen userBegin(); // starts the interrupts DueTimer::getAvailable().attachInterrupt(myTouchInt).start(TIMER1); // for touch / untouch DueTimer::getAvailable().attachInterrupt(StatInt).start(TIMER2); // for status bar computing DueTimer::getAvailable().attachInterrupt(TimeInt).start(TIMER3);; // for user task and time task Show(); Draw(); }
void ECCalibrateScreen::begin() { // Initial setup myUTFT.InitLCD(); myUTFT.clrScr(); myTouch.InitTouch(); myTouch.setPrecision(PREC_MEDIUM); myUTFT.setFont(BigFont); myUTFT.setBackColor(0, 0, 255); myButtons.setTextFont(BigFont); resetButtons(); sensorstring = ""; sensorstring.reserve(30); //set aside some bytes for receiving data inputstring = ""; waiting_for_info = false; waiting_for_single_reading = false; sensor_stringcomplete = false; factReset = false; inStopMode = false; waiting_for_dry = false; Serial3.begin(38400); //To communicate with the sensor. Serial.begin(115200); //Start Read straight away. inputstring = ( waterTempString + ",C\r"); //Start based on temp. Serial3.print(inputstring); //send command to sensor. }