

If you have a datasheet or sample code that uses 8 bit address, you'll want to drop the low bit (i.e. The Wire library uses 7 bit addresses throughout. 7 bits identify the device, and the eighth bit determines if it's being written to or read from. There are both 7- and 8-bit versions of I2C addresses. Because of this, send() and receive() have been replaced with read() and write(). The Arduino Due has two I2C / TWI interfaces SDA1 and SCL1 are near to the AREF pin and the additional one is on pins 20 and 21.Īs a reference the table below shows where TWI pins are located on various Arduino boards.Īs of Arduino 1.0, the library inherits from the Stream functions, making it consistent with other read/write libraries. On the Arduino boards with the R3 layout (1.0 pinout), the SDA (data line) and SCL (clock line) are on the pin headers close to the AREF pin.

This library allows you to communicate with I2C / TWI devices.

This is a multi-platform library that will work with several different development board types.įixed warnings regarding deprecated conversions when using print()Ĭhanged the way the screen buffer is allocatedĪdded more examples and grouped them into 128x32 and 128圆4 resolutionĪdded support for ESP8266 (only tested on Wemos/Lolin D1 Mini)Īdded support for ESP32 (only tested on Heltec WiFi Kit 32)įor a full list of changes please see the file version.txt included in the download.Reference Language | Libraries | Comparison | Changes Some demos showcasing most of the functions are included in the download. This library will in this case fall back to a software-based, TWI-/I 2C-like protocol which will require exclusive access to the pins used.

If you experience problems with pin-sharing you can move the displays SDA and SCL pins to any available pins on your development board. The library has not been tested in combination with the Wire library and I have no idea if they can share pins. If you are upgrading from an older version of the library you should read about the changes in the manual. There are some important changes from v1.xx. This library will default to I 2C Fast Mode (400 KHz) when using the hardware I 2C interface. This library has been made to make it easy to use 128x32 and 128圆4 pixel OLED displays based on the SSD1306 controller chip with an Arduino, chipKit, ESP8266 or ESP32. Rather donate hardware directly? Then click here. And use any of my projects or libraries, and would like to encourage further development you can donate through PayPal here:
