![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Guide program for display oled I2C 128x64
Dependencies: mbed Adafruit_GFX
main.cpp
- Committer:
- WIzMatthew
- Date:
- 2017-04-17
- Revision:
- 12:f7375e185594
- Parent:
- 11:f4ecb5faeffe
- Child:
- 13:52e9c29e2f88
File content as of revision 12:f7375e185594:
#include "mbed.h" #include "Adafruit_SSD1306.h" DigitalOut myled_R(LED_RED); I2C i2c(PA_10,PA_9); Adafruit_SSD1306_I2c myOled(i2c,NC,0x78,64,128); int main() { //i2c.frequency(100000); i2c.start(); uint16_t x=0; myOled.begin(); myOled.printf("%ux%u \nHellow World\r\n", myOled.width(), myOled.height()); myOled.display(); while(1) { myled_R = !myled_R; myOled.printf("%u\r",x); myOled.display(); x = x + 1; wait(1.0); } }