nullkid
September 22, 2023, 1:01am
1
Hey there, I've been trying to make some graphics display from a Nano on to an I2C 128x96 SSD1327 display I bought from Temu (yes I know it's not reliable but I can't afford anything else), and I can't seem to get it to work. It does not appear when running any kind of I2C scan. I've created some code in hopes that it would work, but no luck. Here's the code though:
#include <Arduino.h>
#include <U8g2lib.h>
#include <SPI.h>
#include <Wire.h>
U8G2_SSD1327_VISIONOX_128X96_F_SW_I2C u8g2(U8G2_R0, 21, 22);
void setup(void) {
u8g2.begin();
}
void loop(void) {
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_ncenB14_tr);
u8g2.drawStr(0,20,"Hello World!");
u8g2.sendBuffer();
}
I have the SDA pin connected to the A4, and the SCL connected to the A5, the GND connected to GND pin 29, and VCC connected to 3V3.
Any tips?
Thanks,
NuLL
LarryD
September 22, 2023, 1:11am
2
Try:
#include <Arduino.h>
#include <U8g2lib.h>
#include <SPI.h>
#include <Wire.h>
U8G2_SSD1327_VISIONOX_128X96_F_SW_I2C u8g2(U8G2_R0, 21, 22);
void setup(void)
{
u8g2.begin();
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_ncenB14_tr);
u8g2.drawStr(0,20,"Hello World!");
u8g2.sendBuffer();
}
void loop(void)
{
}
See this also:
#include <Adafruit_SSD1327.h>
// Used for software SPI
#define OLED_CLK 13
#define OLED_MOSI 11
// Used for software or hardware SPI
#define OLED_CS 10
#define OLED_DC 8
// Used for I2C or SPI
#define OLED_RESET -1
// software SPI
//Adafruit_SSD1327 display(128, 128, OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
// hardware SPI
//Adafruit_SSD1327 display(128, 128, &SPI, OLED_DC, OLED_RESET, OLED_CS);
// I2C
Adafruit_SSD1327 display(128, 128, &Wire, OLED_RESET, 1000000);
This file has been truncated. show original
Why are you using software I2C instead of hardware?
A4 is digital pin 18, A5 is 19. Do not use the physical pin numbering for the holes in the Nano.
If the I2C scanner cannot locate the board, then there is something wrong.
Do you have the headers or wires soldered to the Nano and the display?
nullkid
September 22, 2023, 12:19pm
5
I'm using F-F jumper wires, the display is a module and has a standard 4 male ends to plug jumpers into.
nullkid
September 22, 2023, 12:20pm
6
I'm a noob, that's why. Sorry for my stupidity! I just googled "arduino nano pin numbers"
nullkid
September 22, 2023, 12:21pm
7
No luck with u8g2. I'll have to try the Adafruit lib next, thanks for your insight!
nullkid
September 22, 2023, 6:36pm
8
Here's my setup (I moved the extra F-F wires after this):
nullkid
October 24, 2023, 12:59pm
9
Hey there, does anyone have any ideas?
system
Closed
April 21, 2024, 12:59pm
10
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.