Skip to content

Instantly share code, notes, and snippets.

@ganzuul
Last active April 11, 2020 18:03
Show Gist options
  • Save ganzuul/9243031335a8534d0b33ec3283b68b3f to your computer and use it in GitHub Desktop.
Save ganzuul/9243031335a8534d0b33ec3283b68b3f to your computer and use it in GitHub Desktop.
There is an error in the Adafruit GFX I2C examples for mbed
#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