Hey all,
Ive been trying to set up my Teensy 3.2 with an OLED module (Waveshare 1.5inch RGB OLED) using SPI.
Im working with this SSD13XX library
And Im compiling this example
I have uncommented the proper line in the library settings, and re-commented the default as per the instructions state (#include "../_display/SSD_1351_128x128.h").
I have RS tied to 3.3v
DC Tied to pin 9
CS tied ti pin 10
CLK tied to pin 13
DIN tied to pin 12
I confirmed that the code makes it to the else block that has tft.print("Ready!"); and no errors are printing to the serial monitor.
Thanks in advance for your help.
Code paste below
Ive been trying to set up my Teensy 3.2 with an OLED module (Waveshare 1.5inch RGB OLED) using SPI.
Im working with this SSD13XX library
And Im compiling this example
I have uncommented the proper line in the library settings, and re-commented the default as per the instructions state (#include "../_display/SSD_1351_128x128.h").
I have RS tied to 3.3v
DC Tied to pin 9
CS tied ti pin 10
CLK tied to pin 13
DIN tied to pin 12
I confirmed that the code makes it to the else block that has tft.print("Ready!"); and no errors are printing to the serial monitor.
Thanks in advance for your help.
Code paste below
Code:
#include <SPI.h>
#include <SSD_13XX.h>
/*
Teensy3.x and Arduino's
You are using 4 wire SPI here, so:
MOSI: 11//Teensy3.x/Arduino UNO (for MEGA/DUE refere to arduino site)
MISO: 12//Teensy3.x/Arduino UNO (for MEGA/DUE refere to arduino site)
SCK: 13//Teensy3.x/Arduino UNO (for MEGA/DUE refere to arduino site)
ESP8266-----------------------------------
Use:
#define __CS 16 //(D0)
#define __DC 5 //(D1)
#define __RST 4 //(D2)
SCLK:D5
MOSI:D7
*/
#define __CS1 10
#define __DC 9
/*
Teensy 3.x can use: 2,6,10,15,20,21,22,23
Arduino's 8 bit: any
DUE: check arduino site
If you do not use reset, tie it to +3V3
*/
uint8_t errorCode = 0;
SSD_13XX tft = SSD_13XX(__CS1, __DC);
void setup() {
Serial.begin(38400);
Serial.println("TEST");
pinMode(6, OUTPUT);
digitalWrite(6, HIGH);
long unsigned debug_start = millis();
while (!Serial && ((millis() - debug_start) <= 5000));
Serial.println("serial ok, testing lib...");
tft.begin();
//the following it's mainly for Teensy
//it will help you to understand if you have choosed the
//wrong combination of pins!
errorCode = tft.getErrorCode();
if (errorCode != 0) {
Serial.print("Init error! ");
if (bitRead(errorCode, 0)) Serial.print("MOSI or SCLK pin mismach!\n");
if (bitRead(errorCode, 1)) Serial.print("CS or DC pin mismach!\n");
}
else {
tft.print("Ready!");
Serial.println("SDASD");
}
}
void loop(void) {
}