X-Git-Url: https://vault307.fbx.one/gitweb/RPI-PICO-I2C-LCD.git/blobdiff_plain/5df3b96f4c56fbf30e5fa14d2fc32104915d6056..25cec0dd31b884b4141a6e649d45befae612706f:/README.md?ds=sidebyside diff --git a/README.md b/README.md index d405ec7..46e9939 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ This is a project which adapts code from another user to allow usage of the PCF8 Credit: https://github.com/dhylands/python_lcd/tree/master/lcd mostly to Dave Hylands for the basic api and lcd driver code. +Project: Check it out for a full step-by-setp guide on Instructables: https://www.instructables.com/RPI-Pico-I2C-LCD-Control/ + This is code adaptded for micropython and the Raspberry Pi PICO specifically. Usage: @@ -34,9 +36,17 @@ in my case, the decimal addr. was 39 which converts to 0x27 in hex. - Ensure that your SCL and SDA pins are selected properly in accordance with the Pico's pin table. These connect to the low voltage side of the translator with a 3.3V Reference from the board. The high voltage side gets a 5V reference from the VBUS pin of the Pico. - Finally, assure the I2C_NUM_ROWS and I2C_NUM_COLS are set properly! -Usage: +Functions / Usage: -Printing is simple :lcd.putstr("") This requires a string input! if you want to feed a changing value such as a temperature, it must be: lcd.putstr(str(Variable)) +These are the python commands used in a program! (They can all be found in the lcd_api.py file with definitions to their functions) +- lcd.putstr("Text goes here!") - Send a string of chars to the display IMPORTANT: Use this for printing a variable: lcd.putstr(str(Variable)) [Turns variable into string] +- lcd.show_cursor() / lcd.hide_cursor() - Show / Hide the cursor of the lcd (White bar) +- lcd.blink_cursor_on() / lcd.blink_cursor_off() - Turn on / Off the blinking cursor upon printing +- lcd.backlight_on() / lcd.backlight_off() - Turn on / Off backlight of the LCD (Controlled by a small transistor on the backpack) +- lcd.display_on() / lcd.display_off() - Turn on / Off the display (Not backlight but the entire chip) +- lcd.clear() - Clear all chars or anything written to the display +- lcd.move_to(Col, Row) - Move to position based on row and col values (Y, X) +- lcd.custom_char(Num, bytearray([HEX chars]))) - Num can be any integer 0 - 8 (Writing to CGRAM locations) merely used for numbering. The HEX chars are simply made by using this link: https://maxpromer.github.io/LCD-Character-Creator/. It will provide a string of Hex charecters which can replace the "HEX chars" in the example command. Errors: @@ -46,5 +56,4 @@ Feel to leave comments or questions / issues and I will try to answer / resolve For people wondering how to use this code, Tinkernut on Youtube created a very nice guide + some more features! https://www.youtube.com/watch?v=B8Kr_3xHjqE&t -Announcements / updates: -- Thonny library package coming soon! +