No display on SSD 1325 with teensy3.6 - Warnings

Beginner trying to display something on OLED. Getting these warnings and cannot display even a example from a library of SSD 1325.

#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1325.h>


Adafruit_SSD1325 display(13, 13, 8, 9, 10);




void setup() {
  // put your setup code here, to run once:
  display.begin();
  display.clearDisplay();
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);
  display.println("Hello World");
  display.display();


}

void loop() {
  // put your main code here, to run repeatedly:
  
}



Here are the warnings:

In file included from C:\Users\Tommy\AppData\Local\Temp\.arduinoIDE-unsaved2023814-14180-nlnuwf.3frqj\sketch_sep14a\sketch_sep14a.ino:5:
c:\Users\Tommy\Documents\Arduino\libraries\Adafruit_SSD1325/Adafruit_SSD1325.h:12: warning: "_BV" redefined
   12 | #define _BV(b) (1 << (b))
      | 
In file included from C:\Users\Tommy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.58.1\cores\teensy3/wiring.h:39,
                 from C:\Users\Tommy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.58.1\cores\teensy3/WProgram.h:46,
                 from C:\Users\Tommy\AppData\Local\Temp\arduino\sketches\988F7EE659F7BC5CF65B291836682BF8\pch\Arduino.h:6:
C:\Users\Tommy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.58.1\cores\teensy3/core_pins.h:47: note: this is the location of the previous definition
   47 | #define _BV(n)          (1<<(n))
      | 
In file included from c:\Users\Tommy\Documents\Arduino\libraries\Adafruit_SSD1325\Adafruit_SSD1325.cpp:42:
c:\Users\Tommy\Documents\Arduino\libraries\Adafruit_SSD1325\Adafruit_SSD1325.h:12: warning: "_BV" redefined
   12 | #define _BV(b) (1 << (b))
      | 
In file included from C:\Users\Tommy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.58.1\cores\teensy3/wiring.h:39,
                 from C:\Users\Tommy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.58.1\cores\teensy3/WProgram.h:46,
                 from C:\Users\Tommy\AppData\Local\Temp\arduino\sketches\988F7EE659F7BC5CF65B291836682BF8/pch/Arduino.h:6,
                 from c:\Users\Tommy\Documents\Arduino\libraries\Adafruit_GFX_Library/Adafruit_GFX.h:5,
                 from c:\Users\Tommy\Documents\Arduino\libraries\Adafruit_SSD1325\Adafruit_SSD1325.cpp:41:
C:\Users\Tommy\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.58.1\cores\teensy3/core_pins.h:47: note: this is the location of the previous definition
   47 | #define _BV(n)          (1<<(n))
      | 

Just a $0.02...
The line below is obviously incorrect, because two first arguments of the constructor can't be the same:

See how the constructor is defined in the library:

 /*!
   * @brief Constructor for SSD1325 display
   * @param SID MOSI (microcontroller out, secondary in) pin
   * @param SCLK Serial clock pin
   * @param DC Data/command pin
   * @param RST Reset pin
   * @param CS Chip-select pin
   */
  Adafruit_SSD1325(int8_t SID, int8_t SCLK, int8_t DC, int8_t RST, int8_t CS)

the first argument should be a MOSI pin, and the second is SCLK

2 Likes

The warnings look harmless: the definitions are equivalent - just using a different name for the parameter (n instead of b).

I've changed the MOSI argument to 11 and still no display.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.