Interface
I have chosen board with I2C interface because it takes only 2 data lines.You can see the difference from number of pins I2C has 4 and SPI has 7
So what is advantages for SPI, because it has more data lines?
It should be faster, but if you are not going to show videos, it's not worth it (Personal opinion)
Price <3$
3.3V Data Lines
Driver: SSD1306
Interface IIC(I2C)
You can get one from here.
Some models might be 5V compatible, but you have to check specs for that. I have run mine with 3.3V
From this display I have seen two variations, one color, and two colors, where top part of screen is different color. Down side on this is that there is noticeable black line between colors.
On my board there where printed wrong I2C address, but you can use this I2C scanner to detect your address.
https://playground.arduino.cc/Main/I2cScanner
Hardware setup
VCC -> 3.3V
GRN -> GND
SDA -> D2 (Wemos D1 Mini)
SCL -> D1 (Wemos D1 Mini)
Software setup
For this display you need two libraries.
You need to check from...\Documents\Arduino\libraries\Adafruit_SSD1306\Adafruit_SSD1306.h
Change your I2C address and check that SSD1306_128_64 Size is not commented.
Code Example
-
-Links
You can create bitmaps with this toolhttp://javl.github.io/image2cpp/
Rest of the graphics commands can be found from this page.
https://learn.adafruit.com/adafruit-gfx-graphics-library/graphics-primitives
Remember to check examples that came with adafruit-graphics library!
No comments:
Post a Comment