Hi I'am a newbie,
i want to create a testproject with a little output on a OLED display (0,96 Zoll I2C IIC SPI serielle 128 x 64 OLED LCD LED Display-Module uses i2c-bus) and a testwrite to a SD-Card device (SPI Reader Micro Speicher SD TF Karte Memory Card Shield Module) .
MyCode is:
#include <SD.h>
#include <SPI.h>
#include <SimpleDHT.h>
#include <Adafruit_SSD1306.h>
#include <gfxfont.h>
#include <Adafruit_GFX.h>
#include <Wire.h>
int CS_PIN = 10;
int x=0;
File file;
#define OLED_RESET 4
//Adafruit_SSD1306 display(OLED_RESET); <------------ This Line!!!
void setup()
{
pinMode(CS_PIN, OUTPUT);
SD.begin();
delay(500);
file=SD.open("MYTest.txt", FILE_WRITE);
file.println("BALALALAALLA");
file.close();
}
void loop()
{
//display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
//display.clearDisplay();
//display.display();
//display.setTextColor(WHITE);
//display.println("cccccc");
//display.display();
}
But the program works either when the display commands or the file commands are commented out.
The code above works. But when I include the Adafruit line marked with <------------ This Line!!! the Program dosen't work anymore.
Is it possible that the I2C-Bus (Display) and the SPI (Card) are incompaible. I have no idea. Maybe someone can help me.
Grettings
tola