• 0.1.0 a1c51a2d0f

    BlueFox released this 2021-12-04 17:01:59 +00:00 | 5 commits to master since this release

    Added compatibility for OLED Displays SH1106 and SSD1306

    Examples how to use these drivers
    SH1106
    from RPiGPIOmakertools.drivers.OLED_SH1106 import sh1106
    
    oled = sh1106(1, 0x3C)  # create object of sh1106 (I²C address 0x3C on port 1)
    
    # draw on the display
    draw = oled.draw()  # create an object of ImageDraw.Draw class
    draw.rectangle((5, 5, 40, 40), 1, 1)  # draw an rectangle
    oled.display(oled.image)  # display the changes made on the draw object
    
    SSD1306
    from RPiGPIOmakertools.drivers.OLED_SSD1306 import ssd1306
    
    oled = ssd1306(1, 0x3C)  # create object of ssd1306 (I²C address 0x3C on port 1)
    
    # draw on the display
    draw = oled.draw()  # create an object of ImageDraw.Draw class
    draw.rectangle((5, 5, 40, 40), 1, 1)  # draw an rectangle
    oled.display(oled.image)  # display the changes made on the draw object
    
    NOTE:

    The class function .draw() will get removed with the next minor release

    Downloads