oled (SSD1306) library for tiny

Hello,

I am using an attiny84 and an oled with SSD1306 using I2C. the display works well with the arduino uno and with this library. I am using the dr.Azzy core with the TinyWireM.

someone know a library to use it with the 84 or other attiny? . I know i could rewrite any library but i would like to have something "plug&play" :slight_smile:

no one suggested nothing so i made the changes in the SSD1306 library, maybe it could be helpful for new users. I made smart changes so the compiler would make the work for you (i.e. you don't need to mess with defines inside .h and .cpp)

use the helloworldwire example

SSD1306Ascii.zip (528 KB)

aster94:
Hello,

I am using an attiny84 and an oled with SSD1306 using I2C. the display works well with the arduino uno and with this library. I am using the dr.Azzy core with the TinyWireM.

someone know a library to use it with the 84 or other attiny? . I know i could rewrite any library but i would like to have something "plug&play" :slight_smile:

I has been faced with the same problem. I found the solution. I made a change in the "SSD1306minimal" library by adding in the file USI8TWI_Master.h the following section:

#if defined(AVR_ATtiny24) | defined(AVR_ATtiny44) | defined(AVR_ATtiny84)
#define DDR_USI DDRA
#define PORT_USI PORTA
#define PIN_USI PINA
#define PORT_USI_SDA PORTA6
#define PORT_USI_SCL PORTA4
#define PIN_USI_SDA PINA6
#define PIN_USI_SCL PINA4
#endif