Closed nonchip closed 3 years ago
/* from the header file: Adafruit_SSD1306(uint8_t w, uint8_t h, TwoWire *twi = &Wire, int8_t rst_pin = -1, uint32_t clkDuring = 400000UL, uint32_t clkAfter = 100000UL); */ Adafruit_SSD1306 display(128, 64); void setup(){ display.begin(SSD1306_SWITCHCAPVCC,0x3C); } void loop(){ display.clearDisplay(); display.setCursor(0,0); display.setTextColor(WHITE,BLACK); display.setTextSize(2); display.setTextWrap(false); char buf[3]; sprintf(buf,"%02d",display.height()); // <-- should return 64 display.println(buf); display.display(); }
result:
the value is incorrectly 32, and every 2nd line is blank. interestingly though, it doesn't appear stretched vertically.
32
nevermind, sorry, arduino had some cached objects lying around it was using instead of my current code x_x
result:
the value is incorrectly
32
, and every 2nd line is blank. interestingly though, it doesn't appear stretched vertically.