Hi.
My problem is not proper display data on OLED display.
I have OLED I2C 128x64 display.
When I connect alone display to arduino - it's work very good.
But if I connect RF433 transmitter I have small prolem.
When I use this code: RH_ASK driver; my display don't work when I use this code
Adafruit_SSD1306 display = Adafruit_SSD1306(128, 64, &Wire, 5);. But when I write 128x32 instead 128x64 it works. But it is problem because view is biger, twice bigges. It is bad. How I can using RF433 transmitter with I2C OLED display so that the display will work property?
What I can doing with this problem?
If you don't understand please tell me. I know that my english is basic but I still learn.
I put here part of my code
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 display = Adafruit_SSD1306(128, 64, &Wire, 5);
#include <RH_ASK.h>
RH_ASK driver;
void setup() {
Serial.begin(9600);
if (!driver.init())
Serial.println("init failed");
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C))
{
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
}
Please help me.
Hi
You may be working with the wrong wiring of the transmitter with Arduino. Please re-check them. if you still feel an issue then try any advanced OLED display module.
Hopefully, it will help.
Hi mate.
Thank you for iterested
I send photo how I plug screen and transmitter to arduino and what elements I use.
And I use adwanced OLED display module. With your url I use "0.96 inch oled display for Arduino"
This is link for photo: On forum - Google Drive
No. It doesn't work. I try this. I try any combination.
Maybe exist diferent library for this?
Yes. I know. I try U8glib but when I use this with RF433 library I get message about small memory. So I have to learn about this, what use this. But I can't found tutorial.
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <RH_ASK.h>
// When I use this line, code is compiling but screen not work (black screen, nothing hapend):
Adafruit_SSD1306 display = Adafruit_SSD1306(128, 64, &Wire, 5);
// but when I use this line, display working but i.e. every second line is displayed (first line is display, second is black, third is displayed, next one not, etc):
// Adafruit_SSD1306 display = Adafruit_SSD1306(128, 32, &Wire, 5);
RH_ASK driver;
void setup() {
Serial.begin(9600);
if (!driver.init())
Serial.println("init failed");
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C))
{
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
display.clearDisplay();
display.setTextColor(WHITE,BLACK);
display.setTextSize(1);
display.setCursor(18, 0);
display.print("Display text");
display.display();
delay( 2000 );
}
void loop()
{
display.setTextColor(BLACK, WHITE);
display.setTextSize(1);
display.setCursor(0, 0);
display.print("Display text");
const char *msg = "Hello World!";
driver.send((uint8_t *)msg, strlen(msg));
driver.waitPacketSent();
// delay(1000);
}
When I create object RH_ASK driver; for RF, I can't define Adafruit_SSD1306(128, 64, &Wire, 5); in this way.
In this situation I must definr this like: Adafruit_SSD1306(128, 32, &Wire, 5);. But in this situation screen doesn't work correctly.