/*------------------Code for step 7-------------------*/ #ifndef MATLAB_MEX_FILE #include #include LiquidCrystal lcd(12, 11, 5, 4, 3, 2); #endif /*------------------Code for step 8-------------------*/ if (xD[0] ==1) { #ifndef MATLAB_MEX_FILE int CharCounter = 0; lcd.clear(); lcd.setCursor(0,0); for(CharCounter=0;CharCounter<16;CharCounter++) { lcd.write(lcdinput[CharCounter]); } lcd.setCursor(0,1); for(CharCounter=16;CharCounter<32;CharCounter++) { lcd.write(lcdinput[CharCounter]); } #endif } /*------------------Code for step 9-------------------*/ if (xD[0]!=1) { #ifndef MATLAB_MEX_FILE lcd.begin(16, 2); #endif } xD[0]=1;