void SSD1306::init(bool reset) {
  Wire.begin();

  if ((reset) && (myRst >= 0)) {
    // Setup reset pin direction (used by both SPI and I2C)
    pinMode(myRst, OUTPUT);
    digitalWrite(myRst, HIGH);
    // VDD (3.3V) goes high at start, lets just chill for a ms
    delay(1);
    // bring reset low
    digitalWrite(myRst, LOW);
    // wait 10ms
    delay(10);
    // bring out of reset
    digitalWrite(myRst, HIGH);
    // turn on VCC (9V?)
  }

  sendInitCommands();
  resetDisplay();
}
void SSD1306::init() {
  Wire.begin(mySda, mySdc);
  Wire.setClock(400000); 
  sendInitCommands();
  reset_display();
}
예제 #3
0
void SSD1306::init() {
  Wire.begin();
  Wire.setClock(250000);
  sendInitCommands();
  resetDisplay();
}