sparkfun / SparkFun_Qwiic_OLED_Arduino_Library

Arduino Library for SparkFun's OLED Qwiic (I²C) boards
https://docs.sparkfun.com/SparkFun_Qwiic_OLED_Arduino_Library/introduction/
Other
6 stars 7 forks source link

Support for SparkFun Qwiic OLED - (1.3in., 128x64) #14

Closed b-morgan closed 5 months ago

b-morgan commented 5 months ago

The product, SparkFun Qwiic OLED - (1.3in., 128x64), https://www.sparkfun.com/products/23453, references this library but the library documentation doesn't mention this product.

Is it supported? If so, please update the documentation starting with the README.md

PaulZC commented 5 months ago

Hi Brad (@b-morgan ),

Fixed - v1.0.10. Thanks for the suggestion.

Best wishes, Paul

b-morgan commented 5 months ago

How long before the 1.0.10 library is available from the Arduino "Manage Libraries"?

PaulZC commented 5 months ago

It should update within 24 hours, but you can use 1.0.9 to get going. I only updated the docs and added some additional comments to the examples. Functionally, 1.0.10 is the same as 1.0.9. Your code will look like the example in the hookup guide:

    #include <Wire.h>

    #include <SparkFun_Qwiic_OLED.h> //http://librarymanager/All#SparkFun_Qwiic_OLED
    Qwiic1in3OLED myOLED; // 128x64

    // Fonts
    #include <res/qw_fnt_5x7.h>
    #include <res/qw_fnt_8x16.h>
    #include <res/qw_fnt_31x48.h>
    #include <res/qw_fnt_7segment.h>
    #include <res/qw_fnt_largenum.h>

    void setup()
    {
    Wire.begin();

    myOLED.begin();

    myOLED.erase();

    myOLED.setFont(QW_FONT_5X7);
    myOLED.text(0,0,"01234567");

    myOLED.setFont(QW_FONT_5X7);
    myOLED.text(0,8,"ABCDabcd");

    myOLED.setFont(QW_FONT_8X16);
    myOLED.text(48,0,"ABcd");

    myOLED.setFont(QW_FONT_8X16);
    myOLED.text(48,13,"efGH");

    myOLED.setFont(QW_FONT_7SEGMENT);
    myOLED.text(80,0,"0123");

    myOLED.setFont(QW_FONT_5X7);
    myOLED.text(80,17,"ijkLMNO");

    myOLED.setFont(QW_FONT_LARGENUM);
    myOLED.text(0,16,"012");

    myOLED.setFont(QW_FONT_31X48);
    myOLED.text(36,27,"ABC");

    myOLED.display();
    }

    void loop()
    {
    }
b-morgan commented 5 months ago

Thanks.