Cant find a solution for a compile error

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif

#define PIN 6 // Hier wird angegeben, an welchem digitalen Pin die WS2812 LEDs bzw. NeoPixel angeschlossen sind
#define NUMPIXELS 60 // Hier wird die Anzahl der angeschlossenen WS2812 LEDs bzw. NeoPixel angegeben
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

#include "Wire.h"
#define DS3231_ADDRESSE 0x68
void setup() {
  Wire.begin();
  Serial.begin(38400);
  pixels.begin();
  // aktuelle Zeit     sek min std wt tag mon jahr
  einstellenDS3231zeit(04, 36, 10, 3, 15,  10,  20);
}
void loop(byte sekunde, byte minute, byte stunde, byte wochentag, byte tag, byte monat, byte jahr) {
  zeigeZeit(); // Zeit ausgeben
  delay(1000); // jede Sekunde

  if (digitalRead(sekunde)==10) {
    pixels.setPixelColor(40, pixels.Color(155,0,155));
    Serial.println("HALLO");
  } else {
    pixels.setPixelColor(40, pixels.Color(0,0,0));
    
  }
}
void einstellenDS3231zeit(byte sekunde, byte minute, byte stunde, byte wochentag, byte tag, byte monat, byte jahr) {
  // Datum und Uhrzeit einstellen
  Wire.beginTransmission(DS3231_ADDRESSE);
  Wire.write(0);
  Wire.write(decToBcd(sekunde)); // Sekunden einstellen
  Wire.write(decToBcd(minute)); // Minuten einstellen
  Wire.write(decToBcd(stunde));
  /*Wire.write(decToBcd(wochentag)); // 1=Sonntag ... 7=Samstag
  Wire.write(decToBcd(tag));
  Wire.write(decToBcd(monat));
  Wire.write(decToBcd(jahr)); // 0...99 */
  Wire.endTransmission();
}
void leseDS3231zeit(byte *sekunde, byte *minute,byte *stunde, byte *wochentag, byte *tag, byte *monat, byte *jahr) {
  Wire.beginTransmission(DS3231_ADDRESSE);
  Wire.write(0); // DS3231 Register zu 00h
  Wire.endTransmission();
  Wire.requestFrom(DS3231_ADDRESSE, 7); // 7 Byte Daten vom DS3231 holen
  *sekunde = bcdToDec(Wire.read() & 0x7f);
  *minute = bcdToDec(Wire.read());
  *stunde = bcdToDec(Wire.read() & 0x3f);
  /**wochentag = bcdToDec(Wire.read());
  *tag = bcdToDec(Wire.read());
  *monat = bcdToDec(Wire.read());
  *jahr = bcdToDec(Wire.read()); */
}
void zeigeZeit(){
byte sekunde, minute, stunde, wochentag, tag, monat, jahr;
  leseDS3231zeit(&sekunde, &minute, &stunde, &wochentag, &tag, &monat, &jahr);   // Daten vom DS3231 holen
  /*if (tag < 10) { Serial.print("0");} 
  Serial.print(tag); // ausgeben T.M.J H:M:S
  Serial.print(":");
  if (monat < 10) { Serial.print("0");}
  Serial.print(monat);
  Serial.print(":20");
  Serial.print(jahr);
  Serial.print(" ");
  */if (stunde < 10) { Serial.print("0");}
  Serial.print(stunde, DEC); // byte in Dezimal zur Ausgabe
  Serial.print(":");
  if (minute < 10) { Serial.print("0");}
  Serial.print(minute, DEC);
  Serial.print(":");
  if (sekunde < 10) { Serial.print("0"); }
  Serial.println(sekunde, DEC);
}
byte decToBcd(byte val) {
// Dezimal Zahl zu binary coded decimal (BCD) umwandeln
  return((val/10*16) + (val%10));
}
byte bcdToDec(byte val) {
// BCD (binary coded decimal) in Dezimal Zahl umwandeln
  return((val/16*10) + (val%16));
}

Fehler code:
C:\Users\mka-mzi\AppData\Local\Temp\ccxAenkq.ltrans0.ltrans.o: In function `main':

C:\Users\mka-mzi\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\cores\arduino/main.cpp:46: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino Uno.

Hello,
I have a problem with my code im trying to Show a led if the RTC seconds count is at 10.
The problem is:
"Error when compiling for the Arduino / Genuino Uno board."
I now there is a Libary which is not includet but i cant find the download for it but the samples form NEOPIXEL
include this and it worked but was not instalt.

Does someone have a same/similar problem and can help me

Macrux

That is not the complete error message. Copy the full one.

macrux:
"Error when compiling for the Arduino / Genuino Uno board."

That's just the generic error message that doesn't give us any information we could use to help you with your problem. You need to look at the real error message in the black console pane at the bottom of the ARduino IDE window.

Please do this:

  • When you encounter an error, you'll see a button on the right side of the orange bar "Copy error messages" in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button..
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum's 9000 character limit, save it to a .txt file and post it as an attachment. If you click the "Reply" button here, you will see an "Attachments and other settings" link that will allow you to make the attachment.

I wanted to quote your loop() code but doing so on a mobile phone is proving impossible. Anyway, you have a whole load of variables defined as being passed to loop() but loop is called from the hidden main() function with nothing passed to it, so you can't do that. Loop has to be:

void loop(void) {
// Your code ;
}

Also, I am quite sure the error message contained a lot more than you posted, please post the entre message, somewhere in there it tells you exactly what the problem is.

C:\Users\mka-mzi\AppData\Local\Temp\ccxAenkq.ltrans0.ltrans.o: In function `main':

C:\Users\mka-mzi\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\cores\arduino/main.cpp:46: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino Uno.

Hi I am quite new here,
but mby your problem is in the setup and loop calling. I tried to fix ur code, and my compilation was copleted. So if u had problem with compilation this will help you.
In void loop() or void setup() you should not be calling these functions with any variables. If u want to use ur variables in whole code, make them global variables (talking about

byte *sekunde, byte *minute,byte *stunde, byte *wochentag, byte *tag, byte *monat, byte *jahr

)
if u make them global, all other function will see these variables and you will never need to call function like this

void einstellenDS3231zeit(byte sekunde, byte minute, byte stunde, byte wochentag, byte tag, byte monat, byte jahr)

How make var. global? just define them before setup()

byte sekunde,minute, stunde, wochentag, tag, monat, jahr;
void setup() {
// your setup
}
void loop(){
//your loop 
}
void your_function(){
//your functino
}

Try to read this http://https://www.arduino.cc/en/Reference/VariableDeclaration
if u have any other question let me know

macrux:
C:\Users\mka-mzi\AppData\Local\Temp\ccxAenkq.ltrans0.ltrans.o: In function `main':

C:\Users\mka-mzi\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\cores\arduino/main.cpp:46: undefined reference to `loop'

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino Uno.

Pretty much confirms what I said, you need to remove all those variables from loop() and make loop like I said. As I don't know why you put them there I don't know what you are trying to do so cannot suggest what to do instead, although maybe @pedogreen has the answer to that.

I suggest you go back to the examples in the IDE and on this web site and look at how an Arduino program is structured, when you understand that move on to something more complex.

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif

#define PIN 6 // Hier wird angegeben, an welchem digitalen Pin die WS2812 LEDs bzw. NeoPixel angeschlossen sind
#define NUMPIXELS 60 // Hier wird die Anzahl der angeschlossenen WS2812 LEDs bzw. NeoPixel angegeben
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);

#include "Wire.h"
#define DS3231_ADDRESSE 0x68
byte sekunde,minute, stunde, wochentag, tag, monat, jahr;
void setup() {
  Wire.begin();
  Serial.begin(38400);
  pixels.begin();
  // aktuelle Zeit     sek min std wt tag mon jahr
  einstellenDS3231zeit(04, 36, 10, 3, 15,  10,  20);
}
void loop() {
  zeigeZeit(); // Zeit ausgeben
  delay(1000); // jede Sekunde

  if (digitalRead(sekunde)==10) {
    pixels.setPixelColor(40, pixels.Color(155,0,155));
    Serial.println("HALLO");
  } else {
    pixels.setPixelColor(40, pixels.Color(0,0,0));
    
  }
}
void einstellenDS3231zeit() {
  // Datum und Uhrzeit einstellen
  Wire.beginTransmission(DS3231_ADDRESSE);
  Wire.write(0);
  Wire.write(decToBcd(sekunde)); // Sekunden einstellen
  Wire.write(decToBcd(minute)); // Minuten einstellen
  Wire.write(decToBcd(stunde));
  /*Wire.write(decToBcd(wochentag)); // 1=Sonntag ... 7=Samstag
  Wire.write(decToBcd(tag));
  Wire.write(decToBcd(monat));
  Wire.write(decToBcd(jahr)); // 0...99 */
  Wire.endTransmission();
}
void leseDS3231zeit() {
  Wire.beginTransmission(DS3231_ADDRESSE);
  Wire.write(0); // DS3231 Register zu 00h
  Wire.endTransmission();
  Wire.requestFrom(DS3231_ADDRESSE, 7); // 7 Byte Daten vom DS3231 holen
  *sekunde = bcdToDec(Wire.read() & 0x7f);
  *minute = bcdToDec(Wire.read());
  *stunde = bcdToDec(Wire.read() & 0x3f);
  /**wochentag = bcdToDec(Wire.read());
  *tag = bcdToDec(Wire.read());
  *monat = bcdToDec(Wire.read());
  *jahr = bcdToDec(Wire.read()); */
}
void zeigeZeit(){
  leseDS3231zeit(&sekunde, &minute, &stunde, &wochentag, &tag, &monat, &jahr);   // Daten vom DS3231 holen
  /*if (tag < 10) { Serial.print("0");} 
  Serial.print(tag); // ausgeben T.M.J H:M:S
  Serial.print(":");
  if (monat < 10) { Serial.print("0");}
  Serial.print(monat);
  Serial.print(":20");
  Serial.print(jahr);
  Serial.print(" ");
  */if (stunde < 10) { Serial.print("0");}
  Serial.print(stunde, DEC); // byte in Dezimal zur Ausgabe
  Serial.print(":");
  if (minute < 10) { Serial.print("0");}
  Serial.print(minute, DEC);
  Serial.print(":");
  if (sekunde < 10) { Serial.print("0"); }
  Serial.println(sekunde, DEC);
}
byte decToBcd(byte val) {
// Dezimal Zahl zu binary coded decimal (BCD) umwandeln
  return((val/10*16) + (val%10));
}
byte bcdToDec(byte val) {
// BCD (binary coded decimal) in Dezimal Zahl umwandeln
  return((val/16*10) + (val%16));
}

I removed the variables and set them befor the void setup but now is onther error.
Im trying to build a clock with NEOPIXELS and a RTC. I try to use the time from the RTC to aktivat the LEDs fpr a 00:00 7-Segment display.
But i try first to aktiviat 1 LED With the RTC time.

\\Panda\H-laufwerk\Studis\mka-mzi\Ardunio Uhr\RTC_Einbindung_NEOTEST\RTC_Einbindung_NEOTEST.ino: In function 'void setup()':

RTC_Einbindung_NEOTEST:21:51: error: too many arguments to function 'void einstellenDS3231zeit()'

   einstellenDS3231zeit(04, 36, 10, 3, 15,  10,  20);

                                                   ^

\\Panda\H-laufwerk\Studis\mka-mzi\Ardunio Uhr\RTC_Einbindung_NEOTEST\RTC_Einbindung_NEOTEST.ino:35:6: note: declared here

 void einstellenDS3231zeit() {

      ^~~~~~~~~~~~~~~~~~~~

\\Panda\H-laufwerk\Studis\mka-mzi\Ardunio Uhr\RTC_Einbindung_NEOTEST\RTC_Einbindung_NEOTEST.ino: In function 'void leseDS3231zeit()':

RTC_Einbindung_NEOTEST:53:4: error: invalid type argument of unary '*' (have 'byte {aka unsigned char}')

   *sekunde = bcdToDec(Wire.read() & 0x7f);

    ^~~~~~~

RTC_Einbindung_NEOTEST:54:4: error: invalid type argument of unary '*' (have 'byte {aka unsigned char}')

   *minute = bcdToDec(Wire.read());

    ^~~~~~

RTC_Einbindung_NEOTEST:55:4: error: invalid type argument of unary '*' (have 'byte {aka unsigned char}')

   *stunde = bcdToDec(Wire.read() & 0x3f);

    ^~~~~~

\\Panda\H-laufwerk\Studis\mka-mzi\Ardunio Uhr\RTC_Einbindung_NEOTEST\RTC_Einbindung_NEOTEST.ino: In function 'void zeigeZeit()':

RTC_Einbindung_NEOTEST:62:77: error: too many arguments to function 'void leseDS3231zeit()'

   leseDS3231zeit(&sekunde, &minute, &stunde, &wochentag, &tag, &monat, &jahr);   // Daten vom DS3231 holen

                                                                             ^

\\Panda\H-laufwerk\Studis\mka-mzi\Ardunio Uhr\RTC_Einbindung_NEOTEST\RTC_Einbindung_NEOTEST.ino:48:6: note: declared here

 void leseDS3231zeit() {

      ^~~~~~~~~~~~~~

exit status 1
too many arguments to function 'void einstellenDS3231zeit()'

You're trying to pass seven parameters to a function that expects none. I assume you should add those parameters to the function definition - it looks as though you're trying to use them in the function.