bitbank2 / BitBang_I2C

A software I2C implementation to run on any GPIO pins on any system
GNU General Public License v3.0
235 stars 31 forks source link

Having trouble #7

Closed GreyArea1966 closed 4 years ago

GreyArea1966 commented 4 years ago

This used to work with my display but now seems not to. Same display works with the fullsize driver, so I assume it's just something I'm doing wrong.

Changed pins to 4 and 5 for SDA/SCL as I'm on an Arduino Uno, but just getting blank screen.

bitbank2 commented 4 years ago

A4 != 4. You can specify the pins as port name + bit. For example - PORTB, bit 1 would be 0xb1. Pins A4 and A5 on the Uno can be specified as A4/A5 (they're macros), but if you just use a number, they are pins 18/19.

bitbank2 commented 4 years ago

P.S., if you've connected your display to the A4/A5 lines on the Uno, set the pin numbers to -1 and enable hardware I2C.

GreyArea1966 commented 4 years ago

Working now, the -1 and enabling hardware trick worked, many thanks!