![]() The pins must be configured at the top as follows: #define TFT_CS 8 The line that sets the address is the following one: #define SCREEN_ADDRESS 0x3C /// Adafruit ST7735 and ST7739 Library -> graphicstest I’ve grabbed the example from: Examples -> SSD1306 -> ssd1306128圆4_i2c. My displays come with a default address of 0x3C (although it is marked as 0x78 on the actual display if it is marked at all – the this is due to the least significant bit not be part of the address itself, but it is often included – so 0x3C is the address, but “on the wire” it has to be shifted one bit to the left, which then “looks” like 0x78… but anyway…). The default is to use hardware I2C so all that is required is to set the I2C address to match the display you have. ![]() I’m using the Adafruit graphics library for the SSD1306 range of displays. Also above you can see how you could wire it up for two displays, but one of them will need to have the I2C address changed, before you can do this, but more on that in a moment. It needs just four connections: VCC (5V), GND, SCL (A5), SDA (A4). The basic circuit is as shown on the left. You have to watch out when wiring up your OLED display as there are a number of different combinations of pinout! In my own collection I have displays with different arrangements for VCC and GND for example. ![]() The Nano Every maintains the original Nano’s I2C pins: There are some very common ones using the SSD1306 as the interface chip that hook up to the I2C bus. I’m using the standard Arduino environment as described in my introduction to the Nano Every. Read on for how I hooked up I2C OLED and an SPI TFT displays. In this part of my series on the Arduino Nano Every, I take a look at a couple of common displays to see how they work with the Nano Every.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |