Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 如何修复Arduino中的多个“变量”错误_C++_Arduino_Nodemcu - Fatal编程技术网

C++ 如何修复Arduino中的多个“变量”错误

C++ 如何修复Arduino中的多个“变量”错误,c++,arduino,nodemcu,C++,Arduino,Nodemcu,我从另一个工作草图中为我的项目添加了UDP支持。我的项目以前编译得很好,现在我在Arduino中得到了这些奇怪的“变量”之前声明的错误。我没有改变任何地方的错误似乎是 Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None,

我从另一个工作草图中为我的项目添加了UDP支持。我的项目以前编译得很好,现在我在Arduino中得到了这些奇怪的“变量”之前声明的错误。我没有改变任何地方的错误似乎是

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 512000"

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:2:7: error: redefinition of 'int i'

   int i;

       ^

Wordclock_IR:2:5: error: 'int i' previously declared here

 int i;

     ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:3:7: error: redefinition of 'int r'

   int r = 255;  // Global Red Colour

       ^

Wordclock_IR:3:5: error: 'int r' previously defined here

 int r = 255;  // Global Red Colour

     ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:4:7: error: redefinition of 'int g'

   int g = 255;  // Global Green Colour

       ^

Wordclock_IR:4:5: error: 'int g' previously defined here

 int g = 255;  // Global Green Colour

     ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:5:7: error: redefinition of 'int b'

   int b = 255;  // Global Blue Colour

       ^

Wordclock_IR:5:5: error: 'int b' previously defined here

 int b = 255;  // Global Blue Colour

     ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:6:7: error: redefinition of 'int testHours'

   int testHours = 0;

       ^

Wordclock_IR:6:5: error: 'int testHours' previously defined here

 int testHours = 0;

     ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:7:7: error: redefinition of 'int testMinutes'

   int testMinutes = 0;

       ^

Wordclock_IR:7:5: error: 'int testMinutes' previously defined here

 int testMinutes = 0;

     ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:8:7: error: redefinition of 'int testSeconds'

   int testSeconds = 0;

       ^

Wordclock_IR:8:5: error: 'int testSeconds' previously defined here

 int testSeconds = 0;

     ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:9:8: error: redefinition of 'long int ClDone'

   long ClDone = 0;

        ^

Wordclock_IR:9:6: error: 'long int ClDone' previously defined here

 long ClDone = 0;

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:10:9: error: redefinition of 'float Brightness'

   float Brightness = 1; // Global Brightness from 0 to 1-

         ^

Wordclock_IR:10:7: error: 'float Brightness' previously defined here

 float Brightness = 1; // Global Brightness from 0 to 1-

       ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:11:14: error: redefinition of 'const long int oneSecondDelay'

   const long oneSecondDelay = 1000;

              ^

Wordclock_IR:11:12: error: 'const long int oneSecondDelay' previously defined here

 const long oneSecondDelay = 1000;

            ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:12:14: error: redefinition of 'const long int halfSecondDelay'

   const long halfSecondDelay = 500;

              ^

Wordclock_IR:12:12: error: 'const long int halfSecondDelay' previously defined here

 const long halfSecondDelay = 500;

            ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:13:12: error: redefinition of 'uint16_t RECV_PIN'

   uint16_t RECV_PIN = D4; // IR Receiver

            ^

Wordclock_IR:13:10: error: 'uint16_t RECV_PIN' previously defined here

 uint16_t RECV_PIN = D4; // IR Receiver

          ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:19:10: error: redefinition of 'String inputString'

   String inputString = "";         // a string to hold incoming data

          ^

Wordclock_IR:19:8: error: 'String inputString' previously declared here

 String inputString = "";         // a string to hold incoming data

        ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:20:11: error: redefinition of 'boolean stringComplete'

   boolean stringComplete = false;

           ^

Wordclock_IR:20:9: error: 'boolean stringComplete' previously defined here

 boolean stringComplete = false;

         ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:41:13: error: redefinition of 'boolean debug'

     boolean debug = true;

             ^

Wordclock_IR:54:9: error: 'boolean debug' previously defined here

 boolean debug = true;

         ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:56:15: error: redefinition of 'char ssid []'

     char ssid[] = "boysdeprimery";

               ^

Wordclock_IR:69:6: error: 'char ssid [14]' previously defined here

 char ssid[] = "boysdeprimery";

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:57:15: error: redefinition of 'char pass []'

     char pass[] = "2110200002022006hahnweg1067133";

               ^

Wordclock_IR:70:6: error: 'char pass [31]' previously defined here

 char pass[] = "2110200002022006hahnweg1067133";

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:58:18: error: redefinition of 'unsigned int localPort'

     unsigned int localPort = 8888; // local UDP port to listen to

                  ^

Wordclock_IR:28:14: error: 'unsigned int localPort' previously defined here

 unsigned int localPort = 8888;      // local UDP port to listen on

              ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:59:17: error: redefinition of 'const char* netServerName'

     const char* netServerName = "0.europe.pool.ntp.org";  // URL of NTP server

                 ^

Wordclock_IR:72:13: error: 'const char* netServerName' previously defined here

 const char* netServerName = "0.europe.pool.ntp.org";  // URL of NTP server

             ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:60:15: error: redefinition of 'const int NTP_PACKET_SIZE'

     const int NTP_PACKET_SIZE = 48;  // ntp timestamp in the first 48 bytes

               ^

Wordclock_IR:73:11: error: 'const int NTP_PACKET_SIZE' previously defined here

 const int NTP_PACKET_SIZE = 48;  // ntp timestamp in the first 48 bytes

           ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:61:39: error: redefinition of 'byte packetBuffer [48]'

     byte packetBuffer[ NTP_PACKET_SIZE]; // buffer for in/outcoming messages

                                       ^

Wordclock_IR:74:6: error: 'byte packetBuffer [48]' previously declared here

 byte packetBuffer[ NTP_PACKET_SIZE]; // buffer for in/outcoming messages

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:62:13: error: redefinition of 'WiFiUDP udp'

     WiFiUDP udp; // Initialize UDP

             ^

Wordclock_IR:75:9: error: 'WiFiUDP udp' previously declared here

 WiFiUDP udp; // Initialize UDP

         ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:63:15: error: redefinition of 'const int timeZone'

     const int timeZone = 2; // Setting Timezone (1 is MEZ)

               ^

Wordclock_IR:76:11: error: 'const int timeZone' previously defined here

 const int timeZone = 2; // Setting Timezone (1 is MEZ)

           ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:64:25: error: redefinition of 'IPAddress timeServer'

     IPAddress timeServer(195, 50, 171, 101); // Setting NTP Server IP Address 37.221.195.24

                         ^

Wordclock_IR:77:11: error: 'IPAddress timeServer' previously declared here

 IPAddress timeServer(195, 50, 171, 101); // Setting NTP Server IP Address 37.221.195.24

           ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:66:8: error: redefinition of 'time_t prevDisplay'

 time_t prevDisplay = 0;          // when the digital clock was displayed

        ^

Wordclock_IR:79:8: error: 'time_t prevDisplay' previously defined here

 time_t prevDisplay = 0;          // when the digital clock was displayed

        ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:69:25: error: redefinition of 'IRrecv irrecv'

   IRrecv irrecv(RECV_PIN);

                         ^

Wordclock_IR:82:8: error: 'IRrecv irrecv' previously declared here

 IRrecv irrecv(RECV_PIN);

        ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:70:18: error: redefinition of 'decode_results results'

   decode_results results;

                  ^

Wordclock_IR:83:16: error: 'decode_results results' previously declared here

 decode_results results;

                ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:74:19: error: redefinition of 'Adafruit_NeoPixel strip'

 Adafruit_NeoPixel strip = Adafruit_NeoPixel(114, PIN, NEO_GRB + NEO_KHZ800); // Define Object NeoPixel RGB Strip

                   ^

Wordclock_IR:87:19: error: 'Adafruit_NeoPixel strip' previously declared here

 Adafruit_NeoPixel strip = Adafruit_NeoPixel(114, PIN, NEO_GRB + NEO_KHZ800); // Define Object NeoPixel RGB Strip

                   ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:77:5: error: redefinition of 'int pxlColor'

 int pxlColor = strip.Color(r, g, b);  // set Color pxlColor which is used later. r,g,b are RGB values

     ^

Wordclock_IR:90:5: error: 'int pxlColor' previously declared here

 int pxlColor = strip.Color(r, g, b);  // set Color pxlColor which is used later. r,g,b are RGB values

     ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:78:5: error: redefinition of 'int blank'

 int blank = strip.Color(0,0,0); // define "blank" as all dark

     ^

Wordclock_IR:91:5: error: 'int blank' previously declared here

 int blank = strip.Color(0, 0, 0); // define "blank" as all dark

     ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void setup()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:81:6: error: redefinition of 'void setup()'

 void setup() {

      ^

Wordclock_IR:94:6: error: 'void setup()' previously defined here

 void setup() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void loop()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:133:6: error: redefinition of 'void loop()'

 void loop() {

      ^

Wordclock_IR:147:6: error: 'void loop()' previously defined here

 void loop() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void IRcmd(int)':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:166:6: error: redefinition of 'void IRcmd(int)'

 void IRcmd(int code) {

      ^

Wordclock_IR:234:6: error: 'void IRcmd(int)' previously defined here

 void IRcmd(int code) {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void setColor(int, int, int)':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:283:6: error: redefinition of 'void setColor(int, int, int)'

 void setColor(int red, int green, int blue) {

      ^

Wordclock_IR:351:6: error: 'void setColor(int, int, int)' previously defined here

 void setColor(int red, int green, int blue) {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void doBefehl(String)':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:294:6: error: redefinition of 'void doBefehl(String)'

 void doBefehl(String befehl) {

      ^

Wordclock_IR:362:6: error: 'void doBefehl(String)' previously defined here

 void doBefehl(String befehl) {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void minutes_led()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:301:6: error: redefinition of 'void minutes_led()'

 void minutes_led() {

      ^

Wordclock_IR:369:6: error: 'void minutes_led()' previously defined here

 void minutes_led() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void serialEvent()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:332:6: error: redefinition of 'void serialEvent()'

 void serialEvent() {

      ^

Wordclock_IR:400:6: error: 'void serialEvent()' previously defined here

 void serialEvent() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void showSettings()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:346:6: error: redefinition of 'void showSettings()'

 void showSettings() {

      ^

Wordclock_IR:414:6: error: 'void showSettings()' previously defined here

 void showSettings() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'time_t getNtpTime()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:366:8: error: redefinition of 'time_t getNtpTime()'

 time_t getNtpTime()

        ^

Wordclock_IR:434:8: error: 'time_t getNtpTime()' previously defined here

 time_t getNtpTime()

        ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void sendNTPpacket(IPAddress&)':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:390:6: error: redefinition of 'void sendNTPpacket(IPAddress&)'

 void sendNTPpacket(IPAddress &address)

      ^

Wordclock_IR:458:6: error: 'void sendNTPpacket(IPAddress&)' previously defined here

 void sendNTPpacket(IPAddress &address)

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void Reset()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:413:6: error: redefinition of 'void Reset()'

 void Reset() {

      ^

Wordclock_IR:481:6: error: 'void Reset()' previously defined here

 void Reset() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void fastTest()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:420:6: error: redefinition of 'void fastTest()'

 void fastTest() { // NOT WORKING!!!!

      ^

Wordclock_IR:488:6: error: 'void fastTest()' previously defined here

 void fastTest() { // NOT WORKING!!!!

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void doClockLogic()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:431:6: error: redefinition of 'void doClockLogic()'

 void doClockLogic() 

      ^

Wordclock_IR:499:6: error: 'void doClockLogic()' previously defined here

 void doClockLogic()

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void resetAllBlack()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:460:6: error: redefinition of 'void resetAllBlack()'

 void resetAllBlack() {

      ^

Wordclock_IR:528:6: error: 'void resetAllBlack()' previously defined here

 void resetAllBlack() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void doINTRO()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:464:6: error: redefinition of 'void doINTRO()'

 void doINTRO() {

      ^

Wordclock_IR:532:6: error: 'void doINTRO()' previously defined here

 void doINTRO() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void blinkFUNK()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:477:6: error: redefinition of 'void blinkFUNK()'

 void blinkFUNK()

      ^

Wordclock_IR:545:6: error: 'void blinkFUNK()' previously defined here

 void blinkFUNK()

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void colorWipe(uint32_t, uint8_t)':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:495:6: error: redefinition of 'void colorWipe(uint32_t, uint8_t)'

 void colorWipe(uint32_t c, uint8_t wait) {

      ^

Wordclock_IR:563:6: error: 'void colorWipe(uint32_t, uint8_t)' previously defined here

 void colorWipe(uint32_t c, uint8_t wait) {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void rainbow(uint8_t)':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:503:6: error: redefinition of 'void rainbow(uint8_t)'

 void rainbow(uint8_t wait) {

      ^

Wordclock_IR:571:6: error: 'void rainbow(uint8_t)' previously defined here

 void rainbow(uint8_t wait) {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void theaterChase(uint32_t, uint8_t)':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:516:6: error: redefinition of 'void theaterChase(uint32_t, uint8_t)'

 void theaterChase(uint32_t c, uint8_t wait) {

      ^

Wordclock_IR:584:6: error: 'void theaterChase(uint32_t, uint8_t)' previously defined here

 void theaterChase(uint32_t c, uint8_t wait) {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void digitalClockDisplay()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:533:6: error: redefinition of 'void digitalClockDisplay()'

 void digitalClockDisplay(){

      ^

Wordclock_IR:601:6: error: 'void digitalClockDisplay()' previously defined here

 void digitalClockDisplay() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void printDigits(int)':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:548:6: error: redefinition of 'void printDigits(int)'

 void printDigits(int digits){

      ^

Wordclock_IR:616:6: error: 'void printDigits(int)' previously defined here

 void printDigits(int digits) {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'uint32_t Wheel(byte)':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:558:10: error: redefinition of 'uint32_t Wheel(byte)'

 uint32_t Wheel(byte WheelPos) {

          ^

Wordclock_IR:626:10: error: 'uint32_t Wheel(byte)' previously defined here

 uint32_t Wheel(byte WheelPos) {

          ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushES_IST()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:578:6: error: redefinition of 'void pushES_IST()'

 void pushES_IST() {

      ^

Wordclock_IR:646:6: error: 'void pushES_IST()' previously defined here

 void pushES_IST() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushFUENF1()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:587:6: error: redefinition of 'void pushFUENF1()'

 void pushFUENF1() {

      ^

Wordclock_IR:655:6: error: 'void pushFUENF1()' previously defined here

 void pushFUENF1() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushZEHN()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:596:6: error: redefinition of 'void pushZEHN()'

 void pushZEHN() {

      ^

Wordclock_IR:664:6: error: 'void pushZEHN()' previously defined here

 void pushZEHN() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushZWANZIG()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:604:6: error: redefinition of 'void pushZWANZIG()'

 void pushZWANZIG() {

      ^

Wordclock_IR:672:6: error: 'void pushZWANZIG()' previously defined here

 void pushZWANZIG() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushDREIVIERTEL()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:610:6: error: redefinition of 'void pushDREIVIERTEL()'

 void pushDREIVIERTEL() {

      ^

Wordclock_IR:678:6: error: 'void pushDREIVIERTEL()' previously defined here

 void pushDREIVIERTEL() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushVOR()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:616:6: error: redefinition of 'void pushVOR()'

 void pushVOR() {

      ^

Wordclock_IR:684:6: error: 'void pushVOR()' previously defined here

 void pushVOR() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushFUNK()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:622:6: error: redefinition of 'void pushFUNK()'

 void pushFUNK() {

      ^

Wordclock_IR:690:6: error: 'void pushFUNK()' previously defined here

 void pushFUNK() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushNACH()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:629:6: error: redefinition of 'void pushNACH()'

 void pushNACH() {

      ^

Wordclock_IR:697:6: error: 'void pushNACH()' previously defined here

 void pushNACH() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushHALB()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:635:6: error: redefinition of 'void pushHALB()'

 void pushHALB() {

      ^

Wordclock_IR:703:6: error: 'void pushHALB()' previously defined here

 void pushHALB() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushELF()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:641:6: error: redefinition of 'void pushELF()'

 void pushELF() {

      ^

Wordclock_IR:709:6: error: 'void pushELF()' previously defined here

 void pushELF() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushFUENF2()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:647:6: error: redefinition of 'void pushFUENF2()'

 void pushFUENF2() {

      ^

Wordclock_IR:715:6: error: 'void pushFUENF2()' previously defined here

 void pushFUENF2() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushEINS(bool)':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:653:6: error: redefinition of 'void pushEINS(bool)'

 void pushEINS(bool s) {

      ^

Wordclock_IR:721:6: error: 'void pushEINS(bool)' previously defined here

 void pushEINS(bool s) {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushZWEI()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:662:6: error: redefinition of 'void pushZWEI()'

 void pushZWEI() {

      ^

Wordclock_IR:730:6: error: 'void pushZWEI()' previously defined here

 void pushZWEI() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushDREI()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:668:6: error: redefinition of 'void pushDREI()'

 void pushDREI() {

      ^

Wordclock_IR:736:6: error: 'void pushDREI()' previously defined here

 void pushDREI() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushVIER()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:674:6: error: redefinition of 'void pushVIER()'

 void pushVIER() {

      ^

Wordclock_IR:742:6: error: 'void pushVIER()' previously defined here

 void pushVIER() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushSECHS()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:680:6: error: redefinition of 'void pushSECHS()'

 void pushSECHS() {

      ^

Wordclock_IR:748:6: error: 'void pushSECHS()' previously defined here

 void pushSECHS() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushACHT()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:687:6: error: redefinition of 'void pushACHT()'

 void pushACHT() {

      ^

Wordclock_IR:755:6: error: 'void pushACHT()' previously defined here

 void pushACHT() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushSIEBEN()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:693:6: error: redefinition of 'void pushSIEBEN()'

 void pushSIEBEN() {

      ^

Wordclock_IR:761:6: error: 'void pushSIEBEN()' previously defined here

 void pushSIEBEN() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushZWOELF()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:699:6: error: redefinition of 'void pushZWOELF()'

 void pushZWOELF() {

      ^

Wordclock_IR:767:6: error: 'void pushZWOELF()' previously defined here

 void pushZWOELF() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushZEHN2()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:705:6: error: redefinition of 'void pushZEHN2()'

 void pushZEHN2() {

      ^

Wordclock_IR:773:6: error: 'void pushZEHN2()' previously defined here

 void pushZEHN2() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushNEUN()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:711:6: error: redefinition of 'void pushNEUN()'

 void pushNEUN() {

      ^

Wordclock_IR:779:6: error: 'void pushNEUN()' previously defined here

 void pushNEUN() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushVIERTEL()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:717:6: error: redefinition of 'void pushVIERTEL()'

 void pushVIERTEL() {

      ^

Wordclock_IR:785:6: error: 'void pushVIERTEL()' previously defined here

 void pushVIERTEL() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushUHR()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:723:6: error: redefinition of 'void pushUHR()'

 void pushUHR() {

      ^

Wordclock_IR:791:6: error: 'void pushUHR()' previously defined here

 void pushUHR() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushMIN_1()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:730:6: error: redefinition of 'void pushMIN_1()'

 void pushMIN_1() {

      ^

Wordclock_IR:798:6: error: 'void pushMIN_1()' previously defined here

 void pushMIN_1() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushMIN_2()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:734:6: error: redefinition of 'void pushMIN_2()'

 void pushMIN_2() {

      ^

Wordclock_IR:802:6: error: 'void pushMIN_2()' previously defined here

 void pushMIN_2() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushMIN_3()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:738:6: error: redefinition of 'void pushMIN_3()'

 void pushMIN_3() {

      ^

Wordclock_IR:806:6: error: 'void pushMIN_3()' previously defined here

 void pushMIN_3() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void pushMIN_4()':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:742:6: error: redefinition of 'void pushMIN_4()'

 void pushMIN_4() {

      ^

Wordclock_IR:810:6: error: 'void pushMIN_4()' previously defined here

 void pushMIN_4() {

      ^

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino: In function 'void timeToStrip(uint8_t, uint8_t)':

C:\Users\Christopher\Desktop\Wordclock_IR\Wordclock_IR _v1.0.ino:751:6: error: redefinition of 'void timeToStrip(uint8_t, uint8_t)'

 void timeToStrip(uint8_t hours,uint8_t minutes)

      ^

Wordclock_IR:819:6: error: 'void timeToStrip(uint8_t, uint8_t)' previously defined here

 void timeToStrip(uint8_t hours, uint8_t minutes)

      ^

exit status 1
'int i' previously declared here


我真的找不到我的错误,因为我没有更改任何相关代码,有什么建议吗?

所以我重新逐行重新编写了所有内容,现在它编译得很好。

每个项目文件夹只能有1个具有相同项目名称的.ino文件,如果您有多个,它似乎会编译所有内容,并出现此错误


我也有同样的问题,并通过删除另一个文件修复了这个错误,Wordclock_IR:2:5:error:“int I”之前在这里声明过。您的问题不清楚是什么更改导致错误弹出。请删除所有.ino文件。