X-Git-Url: https://vault307.fbx.one/gitweb/RPI-PICO-I2C-LCD.git/blobdiff_plain/956a0c32a4fbe580e472e93aa4957e2730ef8ed5..548135831f08e66a93ee862698b031bf805c282b:/README.md?ds=inline diff --git a/README.md b/README.md index 46e9939..ea6bd6e 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,13 @@ Setup Changes: - 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()) +``` - 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. @@ -50,7 +52,7 @@ These are the python commands used in a program! (They can all be found in the l 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!