Im in a Project an need Help asap!

I need your help pls help me asap...
My Error always is:

exit status 1
'Drehgeber_setup' was not declared in this scope

Here's my Code:

// *** Externe Bibliotheken einlesen ***
#include <Adafruit_NeoPixel.h> // Library für serielle LED Ansteuerung
#include <EEPROM.h> // Library für permanenten Speicher (Farbe, Helligkeit, AM/PM)
#include <Wire.h> // Library für serielle Schnittstelle zu Echtzeituhr (RTC)
#include <RTClib.h> // Library zum Speichern/Auslesen der Uhrdaten

#ifdef AVR
#include <avr/power.h> // Library Arduino AVR
#endif

// *** Einstellungen NeoPixel Library (Ansteuerung LED) ***
#define NUMPIXELS 125 // Anzahl angeschlossener LED (11 x 11) + 4
#define PIN 6 // Verwendeter Arduino Pin für LED (NeoPixels)
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

// Benoetigte Konstanten definieren
#define SIZE_X 11 // Anzeigegroesse X-Richtung
#define SIZE_Y 11 // Anzeigegroesse Y-Richtung
#define SIZE_MINUTES 4 // Groesse Minutenanzeige (0 - 4)
#define SIZE_COLOR 64 // Anzahl moeglicher Farben
#define SIZE_BRIGHTNESS 64 // Anzahl moeglicher Helligkeitswerte

// Benoetigte Variablen deklarieren
int colorID = 16;
int brightness = 10;
int deltaDrehgeber = 0;

static int x=0;
static int y=0;
static byte part=0;

static byte sm_Button = 0; // Zustand der Statemachine. Wechselt mit jedem Knopfdruck

static int minuten = 0; // Minuten 0 bis 59
int minuten5; // Minuten, auf 5 Minuten abgerundet
int minuten_einzel; // Minuten 0 bis 4

static int stunden = 0; // Stunden 0 bis 23
int stunden_angezeigt; // Aufgerundete Stunden, je nach Minuten (z.B. 13:45 = VIERTU VOR ZWOEI)

static bool halbtage_anzeigen = false; // Halbtage anzeigen? (AM/PM)
byte halbtag = 0; // Morgen = 0 (AM), Nachmittag = 1 (PM)

unsigned long act_time = 0;
static unsigned long intro_time = 0;
static unsigned long inaktiv_time = 0;
static bool uhrzeit_verstellt = false;

typedef enum EEProm_store_t
{
COLOR,
HELLIGKEIT,
AMPM
} EEProm_store;

typedef enum FARBEN_t
{
MANGENTA = 0,
BLAU = 8,
CYAN = 16,
GRUEN = 24,
GELB = 32,
ROT = 40,
WEISS = 63,
} FARBEN;

RTC_DS1307 rtc;

void setup() // Initialisierung, wird am Anfang nur einmal durchlaufen:
{
Serial.begin (9600);
Drehgeber_setup();
LED_steuerung_setup();
LED_clear();
colorID = EEPROM.read(COLOR);
brightness = EEPROM.read(HELLIGKEIT);
halbtage_anzeigen = (byte)(EEPROM.read(AMPM));
initRTC();
}

void loop() // Endlosschleife:
{
// Aktuelle Uhrzeit bestimmen (stunden, minuten)
act_time = millis();

if (!uhrzeit_verstellt) // Uhrzeit wurde NICHT verstellt
{
getRTC(&stunden, &minuten);
}

if(Drehgeber_knopf_gedrueckt()) // Wurde Knopf gedrueckt?
{
sm_Button++;
if(sm_Button>11)
{
sm_Button = 1;
}
}
deltaDrehgeber = Drehgeber_delta_lesen(); // Differenz Drehgeber lesen

// Beschleunigung bei schnellem Drehen
if (deltaDrehgeber > 0)
{
deltaDrehgeber = (5 * deltaDrehgeber) - 4; // 1, 6, 11, 16, ...
}

if (deltaDrehgeber < 0)
{
deltaDrehgeber = (5 * deltaDrehgeber) + 4; // -1, -6, -11, -16, ...
}

// Test Led auf print
digitalWrite(LED_BUILTIN, HIGH); // LED einschalten
delay(20); // 20 millisekunden warten
digitalWrite(LED_BUILTIN, LOW); // LED ausschalten
delay(20); // 20 millisekunden warten

// Automatisches Verlassen des Bearbeitungsmodus nach 10 Sekunden
if ( (act_time - inaktiv_time) > 10000) // Sind bereits 10 Sekunden seit letztem Zurücksetzen vergangen?
{
sm_Button = 1; // Dann gehe zu case 1: Uhrzeit anzeigen
}

switch(sm_Button)
{
case 0:
intro();
inaktiv_time = act_time; // Bearbeitungsmodus timeout zurücksetzen
break;

case 1:
uhrzeit_anzeigen();
inaktiv_time = act_time; // Bearbeitungsmodus timeout zurücksetzen
break;

case 2:
uhrzeit_einstellen();
if (deltaDrehgeber != 0)
{
inaktiv_time = act_time; // Bearbeitungsmodus timeout zurücksetzen wenn Knopf gedreht
}
break;

case 3:
if (uhrzeit_verstellt)
{
uhrzeit_speichern();
}
setRTC(stunden, minuten);
inaktiv_time = act_time; // Bearbeitungsmodus timeout zurücksetzen
sm_Button++; // sofort zum naechsten Schritt weiter
break;

case 4: // Helligkeit
helligkeit_einstellen();

if (deltaDrehgeber != 0)
{
inaktiv_time = act_time; // Bearbeitungsmodus timeout zurücksetzen wenn Knopf gedreht
}
break;

case 5: // Helligkeit speichern
EEPROM.update(HELLIGKEIT, brightness);
inaktiv_time = act_time;
sm_Button++; // sofort zum naechsten Schritt weiter
break;

case 6: // Farbe
farbe_einstellen();
if (deltaDrehgeber != 0)
{
inaktiv_time = act_time; // Bearbeitungsmodus timeout zurücksetzen wenn Knopf gedreht
}
break;

case 7: // Farbe speichern
EEPROM.update(COLOR, colorID);
inaktiv_time = act_time; // Bearbeitungsmodus timeout zurücksetzen
sm_Button++; // sofort zum naechsten Schritt weiter
break;

case 8: // AM/PM
ampm_einstellen();
if (deltaDrehgeber != 0)
{
inaktiv_time = act_time; // Bearbeitungsmodus timeout zurücksetzen wenn Knopf gedreht
}
break;

case 9: // AM/PM speichern
EEPROM.update(AMPM, (int)(halbtage_anzeigen));
inaktiv_time = act_time; // Bearbeitungsmodus timeout zurücksetzen
sm_Button++; // sofort zum naechsten Schritt weiter
break;

case 10: // Reset Fancy Demo
LED_clear();
x=0;
y=0;
part=0;
sm_Button++; // sofort zum naechsten Schritt weiter
break;

case 11: // Fancy Demo
fancy_demo();
inaktiv_time = act_time; // Bearbeitungsmodus timeout zurücksetzen
break;

default:
sm_Button = 0;
break;
}
pixels.show(); // Started das Update saemtlicher LED.
}

Thanks :slight_smile:

In such a hurry that you missed reading the how to use this forum stickies, I guess. Read #7 & 11, at least.

In setup(), you try to call the function Drehgeber_setup(), but this isn't defined anywhere in your sketch.

The compiler is right

The Drehgeber_setup() function does not exist in your program. Neither does LED_steuerung_setup() by the way

Where did you get your code from ?

UKHeliBob:
The compiler is right

The Drehgeber_setup() function does not exist in your program. Neither does LED_steuerung_setup() by the way

Where did you get your code from ?

UKHeliBob:
The compiler is right

The Drehgeber_setup() function does not exist in your program. Neither does LED_steuerung_setup() by the way

Where did you get your code from ?

I did this Code 1 year ago for school. But yet, I want to do changes on it. I didn't changed something on the code and why isn't it working yet when it worked before one year? And the Drehgeber_setup() and LED_steuerung_setup() are in a other Code I think. A year ago they were all in the same Window. At the moment they are all a Windows itself. Are they still connected with each other?

What do you mean by "they are all a Windows itself"?

You can have multiple files in a sketch if you like. All those files must be in the same folder. You can check the contents of the sketch folder by doing Sketch > Show Sketch Folder.

pert:
What do you mean by "they are all a Windows itself"?

You can have multiple files in a sketch if you like. All those files must be in the same folder. You can check the contents of the sketch folder by doing Sketch > Show Sketch Folder.

yeah but when I have all files in the same folder and want to open on of these, theres the error who say:
The File "file-name.ino" needs to be inside a sketch folder named "file-name".
Create this folder, move the file, and continue?

When I press OK, they all are in a folder themself...

I suspected that was the problem.

The message tells you what needs to happen. Let's say you have a project with two files: file-name.ino and file-name2.ino. If file-name.ino is your main sketch file, then both those files must be in a folder named file-name. They can't be in a folder named mysketch or something. So put both files in a folder with the correct name and your problem will be solved.

pert:
I suspected that was the problem.

The message tells you what needs to happen. Let's say you have a project with two files: file-name.ino and file-name2.ino. If file-name.ino is your main sketch file, then both those files must be in a folder named file-name. They can't be in a folder named mysketch or something. So put both files in a folder with the correct name and your problem will be solved.

thanks you very much now it works:DD

You're welcome. I'm glad to hear it's working now.

This is a fairly common problem people have with multi-file sketches downloaded from GitHub. The main reason being that GitHub appends the branch name to the .zip download of the repository. So if you have a repository structured like this:

SomeSketch
|_SomeSketchFile.ino
|_SomeOtherSketchFile.ino

When you download it from GitHub and unzip, it will look like this (assuming the branch name was master):

SomeSketch-master
|_SomeSketchFile.ino
|_SomeOtherSketchFile.ino

Then when you open it with the Arduino IDE and click "OK" to the dialog, it ends up like this:

SomeSketch
|_SomeSketchFile.ino

The solution is for the author of the code to put the sketch in a subfolder of the repository:

SomeSketch
|_SomeSketch
|_SomeSketchFile.ino
|_SomeOtherSketchFile.ino

Then the unzipped download looks like this:

SomeSketch-master
|_SomeSketch
|_SomeSketchFile.ino
|_SomeOtherSketchFile.ino

and the sketch folder is still correctly named.

The Arduino developers are aware of this issue and have been working on improving the behavior of the Arduino IDE but that work has not yet been finalized: