/* Update the SPI display to mirror the textbox contents */ private void DisplayTextBoxContents() { try { ssd1306.ClearDisplayBuf(); /* Blank the display buffer */ ssd1306.WriteLineDisplayBuf(Display_TextBoxLine0.Text, 0, 0); ssd1306.WriteLineDisplayBuf(Display_TextBoxLine1.Text, 0, 1); ssd1306.WriteLineDisplayBuf(Display_TextBoxLine2.Text, 0, 2); ssd1306.WriteLineDisplayBuf(Display_TextBoxLine3.Text, 0, 3); ssd1306.DisplayUpdate(); /* Write our changes out to the display */ } /* Show an error if we can't update the display */ catch (Exception ex) { Text_Status.Text = "Status: Failed to update display"; Text_Status.Text = "\nException: " + ex.Message; } }