/// <summary>
        /// Writes a byte array to the specified location on the LCD screen
        /// </summary>
        /// <param name="dataToWrite">Bytes to write to the LCD</param>
        /// <param name="line">Line number, 0 or 1</param>
        /// <param name="x_index">X-location on the screen (0 is far left)</param>
        public void LCD_write(byte[] dataToWrite, LCD_line line, int x_index)
        {
            x_index = utilities.utilities.coerce(x_index, 40, 0);

            byte[] b = new byte[dataToWrite.Length + 1];
            b[0] = (byte)((byte)line + x_index);
            Array.Copy(dataToWrite, 0, b, 1, dataToWrite.Length);
            LCD_write(b);
        }
        /// <summary>
        /// Writes a string to the specified location on the LCD screen
        /// </summary>
        /// <param name="s">String to write to the LCD</param>
        /// <param name="line">Line number, 0 or 1</param>
        /// <param name="x_index">X-location on the screen (0 is far left)</param>
        public void LCD_write(string s, LCD_line line, int x_index)
        {
            x_index = utilities.utilities.coerce(x_index, 40, 0);

            byte[] b = new byte[s.Length + 1];
            b[0] = (byte)((byte)line + x_index);
            Array.Copy(utilities.utilities.StrToByteArray(s), 0, b, 1, s.Length);
            LCD_write(b);
        }
Example #3
0
        /// <summary>
        /// Writes a byte array to the specified location on the LCD screen
        /// </summary>
        /// <param name="dataToWrite">Bytes to write to the LCD</param>
        /// <param name="line">Line number, 0 or 1</param>
        /// <param name="x_index">X-location on the screen (0 is far left)</param>
        public void LCD_write(byte[] dataToWrite, LCD_line line, int x_index)
        {
            x_index = utilities.utilities.coerce(x_index, 40, 0);

            byte[] b = new byte[dataToWrite.Length + 1];
            b[0] = (byte)((byte)line + x_index);
            Array.Copy(dataToWrite, 0, b, 1, dataToWrite.Length);
            LCD_write(b);
        }
Example #4
0
        /// <summary>
        /// Writes a string to the specified location on the LCD screen
        /// </summary>
        /// <param name="s">String to write to the LCD</param>
        /// <param name="line">Line number, 0 or 1</param>
        /// <param name="x_index">X-location on the screen (0 is far left)</param>
        public void LCD_write(string s, LCD_line line, int x_index)
        {
            x_index = utilities.utilities.coerce(x_index, 40, 0);

            byte[] b = new byte[s.Length + 1];
            b[0] = (byte)((byte)line + x_index);
            Array.Copy(utilities.utilities.StrToByteArray(s), 0, b, 1, s.Length);
            LCD_write(b);
        }