func (display *HD44780) RightToLeft() {
	display.displayMode &= ^LCD_ENTRYLEFT
	display.Command(LCD_ENTRYMODESET | display.displayMode)
}
This is for text that flows Right to Left
package hd44780
import (
	"github.com/mrmorphic/hwio"
)
const (
	LCD_CLEARDISPLAY   byte = 0x01
	LCD_RETURNHOME     byte = 0x02
	LCD_ENTRYMODESET   byte = 0x04
	LCD_DISPLAYCONTROL byte = 0x08
	LCD_CURSORSHIFT    byte = 0x10
	LCD_FUNCTIONSET    byte = 0x20
	LCD_SETCGRAMADDR   byte = 0x40
	LCD_SETDDRAMADDR   byte = 0x80
	LCD_ENTRYRIGHT          byte = 0x00
	LCD_ENTRYLEFT           byte = 0x02
	LCD_ENTRYSHIFTINCREMENT byte = 0x01
	LCD_ENTRYSHIFTDECREMENT byte = 0x00
	LCD_DISPLAYON  byte = 0x04
	LCD_DISPLAYOFF byte = 0x00
	LCD_CURSORON   byte = 0x02
	LCD_CURSOROFF  byte = 0x00
	LCD_BLINKON    byte = 0x01
	LCD_BLINKOFF   byte = 0x00
	LCD_DISPLAYMOVE byte = 0x08
	LCD_CURSORMOVE  byte = 0x00
	LCD_MOVERIGHT   byte = 0x04
	LCD_MOVELEFT    byte = 0x00
	LCD_8BITMODE byte = 0x10
	LCD_4BITMODE byte = 0x00
	LCD_2LINE    byte = 0x08
	LCD_1LINE    byte = 0x00
	LCD_5x10DOTS byte = 0x04
	LCD_5x8DOTS  byte = 0x00
	POSITIVE = 0
	NEGATIVE = 1
)
type HD44780 struct {
	device          hwio.I2CDevice
	displayFunction byte
	displayControl  byte
	displayMode     byte
	numLines        int
	backlight       byte
	d7 byte
	d6 byte
	d5 byte
	d4 byte
	bl byte
	en byte
	rs byte
	rw byte
	blPolarity int
}
type I2CExpanderProfile int
const (
	PROFILE_MJKDZ I2CExpanderProfile = iota
	PROFILE_PCF8574
)
func NewHD44780(module hwio.I2CModule, address int, profile I2CExpanderProfile) *HD44780 {
	switch profile {
	case PROFILE_MJKDZ:
		return NewHD44780Extended(module, address, 4, 5, 6, 0, 1, 2, 3, 7, NEGATIVE)
	case PROFILE_PCF8574:
		return NewHD44780Extended(module, address, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE)
	}
	return nil
}
func NewHD44780Extended(module hwio.I2CModule, address int, en int, rw int, rs int, d4 int, d5 int, d6 int, d7 int, bl int, polarity int) *HD44780 {
	device := module.GetDevice(address)
	result := &HD44780{
		device:     device,
		d7:         1 << uint16(d7),
		d6:         1 << uint16(d6),
		d5:         1 << uint16(d5),
		d4:         1 << uint16(d4),
		bl:         1 << uint16(bl),
		en:         1 << uint16(en),
		rs:         1 << uint16(rs),
		rw:         1 << uint16(rw),
		blPolarity: polarity}
	return result
}
func (display *HD44780) Init(cols int, lines int) {
	display.displayFunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS
	if lines > 1 {
		display.displayFunction |= LCD_2LINE
	}
	display.numLines = lines
	hwio.DelayMicroseconds(50000)
	display.backlight = display.bl
	display.expanderWrite(display.backlight)  
	hwio.Delay(1000)
	display.write4bits(0x03, 0)
	hwio.DelayMicroseconds(4500)  
	display.write4bits(0x03, 0)
	hwio.DelayMicroseconds(4500)  
	display.write4bits(0x03, 0)
	hwio.DelayMicroseconds(150)
	display.write4bits(0x02, 0)
	display.Command(LCD_FUNCTIONSET | display.displayFunction)
	display.displayControl = LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF
	display.Display()
	display.Clear()
	display.displayMode = LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT
	display.Command(LCD_ENTRYMODESET | display.displayMode)
	display.Home()
}
func (display *HD44780) Clear() {
	display.Command(LCD_CLEARDISPLAY)  
	hwio.DelayMicroseconds(2000)       
}
func (display *HD44780) Home() {
	display.Command(LCD_RETURNHOME)  
	hwio.DelayMicroseconds(2000)     
}
func (display *HD44780) SetCursor(col int, row int) {
	rowOffsets := []byte{0x00, 0x40, 0x14, 0x54}
	if row > display.numLines {
		row = display.numLines - 1  
	}
	display.Command(LCD_SETDDRAMADDR | (byte(col) + rowOffsets[row]))
}
func (display *HD44780) NoDisplay() {
	display.displayControl &= ^LCD_DISPLAYON
	display.Command(LCD_DISPLAYCONTROL | display.displayControl)
}
func (display *HD44780) Display() {
	display.displayControl |= LCD_DISPLAYON
	display.Command(LCD_DISPLAYCONTROL | display.displayControl)
}
func (display *HD44780) NoCursor() {
	display.displayControl &= ^LCD_CURSORON
	display.Command(LCD_DISPLAYCONTROL | display.displayControl)
}
func (display *HD44780) Cursor() {
	display.displayControl |= LCD_CURSORON
	display.Command(LCD_DISPLAYCONTROL | display.displayControl)
}
func (display *HD44780) NoBlink() {
	display.displayControl &= ^LCD_BLINKON
	display.Command(LCD_DISPLAYCONTROL | display.displayControl)
}
func (display *HD44780) Blink() {
	display.displayControl |= LCD_BLINKON
	display.Command(LCD_DISPLAYCONTROL | display.displayControl)
}
func (display *HD44780) ScrollDisplayLeft() {
	display.Command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVELEFT)
}
func (display *HD44780) ScrollDisplayRight() {
	display.Command(LCD_CURSORSHIFT | LCD_DISPLAYMOVE | LCD_MOVERIGHT)
}
func (display *HD44780) LeftToRight() {
	display.displayMode |= LCD_ENTRYLEFT
	display.Command(LCD_ENTRYMODESET | display.displayMode)
}