]> vault307.fbx.one Git - RPI-PICO-I2C-LCD.git/blobdiff - README.md
Create LICENSE.md
[RPI-PICO-I2C-LCD.git] / README.md
index dc07612b64bbd8e49e03041b55a013a680fd2fa3..ea6bd6ee713119c6399c355753663b1ff55a2187 100644 (file)
--- 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.
 
 
 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: 
 This is code adaptded for micropython and the Raspberry Pi PICO specifically.
 
 Usage: 
@@ -23,11 +25,13 @@ Setup Changes:
 - Make sure the top address is set correctly!
 Use this small program to scan for I2C devices:
 
 - Make sure the top address is set correctly!
 Use this small program to scan for I2C devices:
 
+```python
 import machine
 sda=machine.Pin(0)
 scl=machine.Pin(1)
 i2c=machine.I2C(0,sda=sda, scl=scl, freq=400000)
 print(i2c.scan())
 import machine
 sda=machine.Pin(0)
 scl=machine.Pin(1)
 i2c=machine.I2C(0,sda=sda, scl=scl, freq=400000)
 print(i2c.scan())
+```
 
 - Once you get an address through the console (REPL), this will be in decimal and not hex. You can convert the decimal to hex or simply put a decimal address in the setup.
 in my case, the decimal addr. was 39 which converts to 0x27 in hex.
 
 - Once you get an address through the console (REPL), this will be in decimal and not hex. You can convert the decimal to hex or simply put a decimal address in the setup.
 in my case, the decimal addr. was 39 which converts to 0x27 in hex.
@@ -43,12 +47,12 @@ These are the python commands used in a program! (They can all be found in the l
 - 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.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 (X, Y)
+- 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:
 
 - 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:
 
-OSERROR : 5 (This is quite a common error, 5 means I/O error. Check Your connections. This means codes can't be sent or recieved ensure SCL and SDA are properly connected through the level translator!
+OSERROR : 5 (This is quite a common error, 5 means I/O error. Check Your connections. This means codes can't be sent or recieved ensure SCL and SDA are properly connected through the level translator or, use 2x 1K resistors, connected between +5V and the SCL and SDA pins, as external pullups.
 
 Feel to leave comments or questions / issues and I will try to answer / resolve them as quick as possible!
 
 
 Feel to leave comments or questions / issues and I will try to answer / resolve them as quick as possible!