Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 7 months ago.
drawLine?
When I try to use the drawLine method the compiler giv me "Method 'drawLine' could not be resolved"
oled test
#include "mbed.h" #include "Adafruit_SSD1306.h" // an I2C sub-class that provides a constructed default class I2CPreInit : public I2C { public: I2CPreInit(PinName sda, PinName scl) : I2C(sda, scl) { frequency(400000); start(); }; }; I2CPreInit gI2C(P0_0,P0_1); Adafruit_SSD1306_I2c oled(gI2C,p27,0x78,64,128); int main() { oled.clearDisplay(); oled.printf("%ux%u OLED Display\r\n", oled.width(), oled.height()); oled.drawLine(0, h-10, w, h-10, WHITE); // horiz line near bottom x1,y1, x2,y2, color }