lexus2k / ssd1306

Driver for SSD1306, SSD1331, SSD1351, IL9163, ILI9341, ST7735, PCD8544, Nokia 5110 displays running on Arduino/ESP32/Linux (Rasperry) platforms
MIT License
662 stars 127 forks source link

How to use Software I2C with this library? #137

Open papsukkal09 opened 2 years ago

papsukkal09 commented 2 years ago

Please provide the following information:

library version 1.8.2

LCD display type ssd1306

Steps to reproduce the issue

Expected behavior

Actual behavior

How can I define software I2C with this library on arduino uno (atmega328p).

define CONFIG_SOFTWARE_I2C_AVAILABLE

define CONFIG_SOFTWARE_I2C_ENABLE

I used this defination but it does nothing.

In Readme file writes if I want to change I2C pins, I can do it with API. Which API and how can I use I didnt understand .

lexus2k commented 2 years ago

Hi,

you need manually initialize software i2c via void ssd1306_i2cInit_Embedded(int8_t scl, int8_t sda, uint8_t sa);

ishyesh commented 11 months ago

First, insert #include "intf/i2c/ssd1306_i2c.h into ssd1305.h.

Also, looking at the source, for Arduino Uno 328p, you have to use ports on PORTC. (ssd1306_i2c_embedded.c).