Last active
April 11, 2020 18:03
-
-
Save ganzuul/9243031335a8534d0b33ec3283b68b3f to your computer and use it in GitHub Desktop.
There is an error in the Adafruit GFX I2C examples for mbed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mbed.h" | |
#include "Adafruit_SSD1306.h" | |
// Instantiate OLED | |
class I2CPreInit : public I2C | |
{ | |
public: | |
I2CPreInit(PinName sda, PinName scl) : I2C(sda, scl) | |
{ | |
frequency(400000); | |
//start(); This broke I2C | |
}; | |
}; | |
I2CPreInit gI2C(PB_9, PB_8); | |
Adafruit_SSD1306_I2c gOled1(gI2C, D13, 0x78,64,128); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment