I have edited the the ssd1306 to add functionality to print through simple function
Dependencies: mbed Adafruit_GFX
main.cpp
- Committer:
- deepanaishtaweera174
- Date:
- 2019-09-25
- Revision:
- 14:2fc2f14f5f86
- Parent:
- 13:52e9c29e2f88
File content as of revision 14:2fc2f14f5f86:
#include "mbed.h" #include "Adafruit_SSD1306.h" DigitalOut myled_R(LED1); I2C i2c(I2C_SDA,I2C_SCL); Adafruit_SSD1306_I2c myOled(i2c,NC,0x78,64,128); int main() { 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(0.1); } }