display package
Submodules
display.lcd module
- class display.lcd.LCD(rs=5, en=6, d4=12, d5=13, d6=16, d7=19)
Bases:
object- width = 16
- high = True
- low = False
- row_1 = 128
- row_2 = 192
- delay = 0.0002
- initialise_lcd()
Start the lcd.
- setup_pins()
Setup output pins.
- send_byte_to_lcd(byte)
To send command to lcd, first put RS to low. To send data to lcd, first put RS to High. Send High 4 bits (nibbles) to D4, D5, D6, D7 pins, Set EN to High, Delay, than to low, (remember every command take sometime to finish, see datasheet and put delay) Then send Low nibbles to D4, D5, D6, D7 pins, Set EN to High, delay, then EN to low.
- send_bits(byte)
Sends 1, 0 to pins of LCD.
- lcd_toggle_enable()
Turn EN high than, low
- cursor_start(start, row, special_char=' ')
Set cursor, from where you want to print data.
- end_fill(end_char=' ')
To fill the remaining space at end of data, “testing” -> “testing “, len() = 16
- rotate_line(print_string, delay=0.2)
Send long strings to lcd.
- change_lcd_mode(mode)
Change mode of lcd, for excecuting lcd command Put RS to “Low”, for sending data to display put RS to “High”
- print_line(print_string)
Send Data to lcd. First set row number to start from, then send data to that row of lcd.
- send_command(command)
Send command to lcd.
- clear()
This will clear the lcd display.