Federico Vivaldi
Published © GPL3+

OLED Display with PSoC5

How to use an OLED screen with a PSoC5.

BeginnerProtip5,090

Things used in this project

Story

Read more

Schematics

psoc to oled connections

You will need to connect vdd and gnd and to select the right pins for SCL and SDA. SDA and SCL pins can be found in pin layout of the psoc.

Code

Psoc oled

C/C++
main.c file for Oled screen on a psoc 4/5
#include <project.h>
#include <stdlib.h>
#include "path\to\header\ssd1306.h"


#define DISPLAY_ADDRESS 0x3C // 011110+SA0+RW - 0x3C or 0x3D NOTE1
int main(){
  I2COLED_Start();             // NOTE2 
   CyGlobalIntEnable;
   display_init(DISPLAY_ADDRESS); // NOTE3

for(;;){

       display_clear();    
       display_update();    
       gfx_setTextSize(1);
       gfx_setTextColor(WHITE);
       gfx_setCursor(2,2);
       gfx_println("Hey there!");
       display_update();    //NOTE4
  }
}

Original Repository

This is the original project i found on github. All credits go to NRDaza.

Credits

Federico Vivaldi

Federico Vivaldi

4 projects • 35 followers
I'm a PhD student in chemistry and material science. I use my hobby in simple electronic to build items for laboratory.
Thanks to NRDaza.

Comments