SSD1306 library and simple graphics core library based on Adafruit GFX Library.

Overview

Raspberry Pico SSD1306 + GFX Library

Based on Adafruit GFX Library https://github.com/adafruit/Adafruit-GFX-Library

Usage

Hardware

Connect your SSD1306 oled display to i2c1 port (you can change it during initialization)

SDA->GPIO2
SCL->GPIO3
GND->GND
VCC->3V3(OUT)

Software

The library needs only two files to run SSD1306.hpp and SSD1306.cpp. This gives you the ability to display a bitmap or array of pixels. You need the GFX library to make it easier to create images for your display. (GFX.hpp and GFX.cpp)

logo.hpp is an example showing how to create bitmaps. fonts.hpp contains one font.

Example

Repo provides an example of how a library can be used.

git clone https://github.com/mbober1/RPi-Pico-SSD1306-library.git
cd RPi-Pico-SSD1306-library/example/
mkdir build
cd build

Change path to pico-sdk in CMakeLists.txt (line 3)

cmake ..
make -j4

Make your own logo

http://www.majer.ch/lcd/adf_bitmap.php

You might also like...
Port of Adafruit / NXP Sensor Fusion filter

AHRS Fusion Port of Adafruit NXP sensor fusion algorithms based on Kalman filters for rust. Resources https://github.com/adafruit/Adafruit_AHRS https:

Visualization Library is a C++ middleware for high-performance 2D and 3D graphics applications based on OpenGL 1.x-4.x supporting Windows, Linux and Mac OS X.

Visualization Library 2.2 Gallery About Visualization Library is a C++ middleware for high-performance 2D and 3D graphics applications based on the in

LiteX is a Migen/MiSoC based Core/SoC builder that provides the infrastructure to easily create Cores/SoCs (with or without CPU).
LiteX is a Migen/MiSoC based Core/SoC builder that provides the infrastructure to easily create Cores/SoCs (with or without CPU).

LiteX is a Migen/MiSoC based Core/SoC builder that provides the infrastructure to easily create Cores/SoCs (with or without CPU). The common components of a SoC are provided directly: Buses and Streams (Wishbone, AXI, Avalon-ST), Interconnect, Common cores (RAM, ROM, Timer, UART, etc...), CPU wrappers/integration, etc... and SoC creation capabilities can be greatly extended with the ecosystem of LiteX cores (DRAM, PCIe, Ethernet, SATA, etc...) that can be integrated/simulated/build easily with LiteX.

IconVG is a compact, binary format for simple vector graphics: icons, logos, glyphs and emoji.
IconVG is a compact, binary format for simple vector graphics: icons, logos, glyphs and emoji.

IconVG IconVG is a compact, binary format for simple vector graphics: icons, logos, glyphs and emoji. WARNING: THIS FORMAT IS EXPERIMENTAL AND SUBJECT

Simple library for oscilloscope vector graphics on ESP32
Simple library for oscilloscope vector graphics on ESP32

VectorGFX Simple library for oscilloscope vector graphics on the ESP32 Background VectorGFX is inspired by (and heavily based on) the V.st project by

OpenGL Template Engine - a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects.
OpenGL Template Engine - a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects.

OpenGL Template Engine is a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects. This is the template I personally use for my own projects and provides me with the general OpenGL 3D render setup with model import and UI.

A PIC/FLIP fluid simulation based on the methods found in Robert Bridson's
A PIC/FLIP fluid simulation based on the methods found in Robert Bridson's "Fluid Simulation for Computer Graphics"

GridFluidSim3d This program is an implementation of a PIC/FLIP liquid fluid simulation written in C++11 based on methods described in Robert Bridson's

Small stack-based DSL for procedurally generated 1-bit graphics
Small stack-based DSL for procedurally generated 1-bit graphics

Bitlang Bitlang is a tiny stack-based DSL, designed for the sole purpose of producing procedurally generated 1-bit art. It is implemented in ANSI-C, a

A fast Perforce to Git conversion tool written in C++ using Perforce Helix Core C++ API and Libgit2

P4 Fusion A fast Perforce depot to Git repository converter using the Helix Core C/C++ API as an attempt to mitigate the performance bottlenecks in gi

Comments
  • Height pixels divided by 2

    Height pixels divided by 2

    I have a RPi Pico and a I2C 0.91" oled 128x32 display.

    With this code the result is a reactangle of 10x5 instead of 10x10 (see image). The second block exceed the vertical no of pixels. Counting the shown vertical pixel it are 16 instead of 32.

        i2c_init(i2c1, 100000);
        gpio_set_function(2, GPIO_FUNC_I2C);
        gpio_set_function(3, GPIO_FUNC_I2C);
        gpio_pull_up(2);
        gpio_pull_up(3);
    
        GFX oled(0x3C, 128, 32, i2c1);
        oled.clear();
        oled.drawFillRectangle(0, 0, oled.getWidth(), oled.getHeight(), colors::BLACK);
        oled.drawFillRectangle(0, 0, 10, 10, colors::WHITE);
        oled.drawFillRectangle(5, 20, 20, 20, colors::WHITE);
        oled.display();
    

    S20210422_0002

    When I define the height as 64 I get an actual height of 32.

        GFX oled(0x3C, 128, 64, i2c1);
        oled.clear();
        oled.drawFillRectangle(0, 0, oled.getWidth(), oled.getHeight(), colors::BLACK);
        oled.drawFillRectangle(0, 0, 10, 10, colors::WHITE);
        oled.drawFillRectangle(5, 20, 20, 20, colors::WHITE);
        oled.drawFillRectangle(0, 20, 5, 30, colors::WHITE);
        oled.display();
    

    S20210422_0003

    With an Arduino it works perfectly. Has any one an idea about the course/solution?

    opened by cvtvoogt 4
  • added font accessors, removed `GFX::swap`

    added font accessors, removed `GFX::swap`

    • this allows to set/get the font, closing #3
    • also, i removed swap from GFX and made it static and anonymous-namespaced. it was private: inline anyway, so literally no way for anything outside of GFX to access it, but it still cluttered the class and exports, so now the compiler knows how to optimize it correctly.
    opened by nonchip 1
Owner
Marcin Bober
Marcin Bober
Gfx - A minimalist and easy to use graphics API.

gfx gfx is a minimalist and easy to use graphics API built on top of Direct3D12/HLSL intended for rapid prototyping. It supports: Full shader reflecti

Guillaume Boissé 343 Dec 29, 2022
a pc heat verifier using arduino uno and oled screen(ssd1306)

pc-heat-check a pc heat verifier using arduino uno and oled screen(ssd1306) to this application works needs this other application running: https://gi

Helder Lourenço de Abreu Marques 1 Oct 5, 2022
GFX Demo for the ESP-IDF

Display Drivers and Demo for GFX This is a Demo of GFX With Several Display Drivers This is not GFX itself, but it includes it. GFX Documentation is b

honey the codewitch 67 Dec 4, 2022
Arduino core for GD32 devices, community developed, based on original GigaDevice's core

GD32 Arduino Core (New) This is a Arduino core is based off of the original GigaDevice core that was provided by the company in early June 2021 (see h

null 46 Dec 24, 2022
GraphicsFuzz provides tools for automatically finding and simplifying bugs in graphics drivers, specifically graphics shader compilers.

GraphicsFuzz GraphicsFuzz is a set of tools for testing shader compilers GraphicsFuzz provides tools for automatically finding and simplifying bugs in

Google 516 Dec 15, 2022
F Graphics Library (FGL) is a small graphics C++ portable library for LCD displays on embedded systems

F Graphics Library (FGL) Full documentation: fgl.docsforge.com (By Filipe Chagas) F Graphics Library is a C++ library that I created for use in embedd

Filipe Chagas 9 Oct 31, 2022
CSC404: Computer Graphics [CG] & CSL402: Computer Graphics Lab [CG Lab]

COMPUTER-GRAPHICS-AND-COMPUTER-GRAPHICS-LAB CSC404: CG & CSL402: CG LAB [SEMESTER IV] Syllabus CG - Reference Books THE WALL MEGA SATISH - AUTHOR CG C

AMEY THAKUR 7 Apr 28, 2022
Timed reminder lights using Adafruit NeoPixels and Arduino Micro (3.3v ATMEGA 32U4)

SmartCoaster When I'm working, I get so focused that I forget to drink water. It's not that I'm not thirsty—oh, I am—but I'll get a glass of water, pu

Steven M. Caruso 18 Nov 17, 2022
Ring powered by an adafruit gemma + neopixel that sends a positive affirmation message to me via morse code

Positive Affirmation Morse Code Ring ✨ Ring powered by an adafruit gemma + neopixel that sends a positive affirmation message to me via slowed-down mo

Stephanie 3 Dec 31, 2021
Interface TI MSP430FR5994 with Adafruit External FRAM

MSP430_Adafruit_ExFRAM About This This repository stores the implementation of the standard MSP430FR5994 SPI protoco interfacing MSP430FR5994 with Ada

Le Zhang 1 Oct 25, 2021