开发板Arduion Uno编译时出错大佬能否解答-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1082|回复: 5

[未解决] 开发板Arduion Uno编译时出错大佬能否解答

[复制链接]
发表于 2021-1-4 01:02 | 显示全部楼层 |阅读模式
Arduino:1.8.12 (Windows 10), 开发板:"Arduino Uno"

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'void RobotMotorBoard::begin()':

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:32:2: error: 'Serial1' was not declared in this scope

  Serial1.begin(9600);

  ^~~~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:32:2: note: suggested alternative: 'Serial'

  Serial1.begin(9600);

  ^~~~~~~

  Serial

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:37:21: error: 'MUXA' was not declared in this scope

  uint8_t MuxPins[]={MUXA,MUXB,MUXC};

                     ^~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:37:21: note: suggested alternative: 'MUX0'

  uint8_t MuxPins[]={MUXA,MUXB,MUXC};

                     ^~~~

                     MUX0

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:37:26: error: 'MUXB' was not declared in this scope

  uint8_t MuxPins[]={MUXA,MUXB,MUXC};

                          ^~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:37:26: note: suggested alternative: 'MUX0'

  uint8_t MuxPins[]={MUXA,MUXB,MUXC};

                          ^~~~

                          MUX0

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:37:31: error: 'MUXC' was not declared in this scope

  uint8_t MuxPins[]={MUXA,MUXB,MUXC};

                               ^~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:37:31: note: suggested alternative: 'MUX0'

  uint8_t MuxPins[]={MUXA,MUXB,MUXC};

                               ^~~~

                               MUX0

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:38:26: error: 'MUX_IN' was not declared in this scope

  this->IRs.begin(MuxPins,MUX_IN,3);

                          ^~~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:38:26: note: suggested alternative: 'MUX0'

  this->IRs.begin(MuxPins,MUX_IN,3);

                          ^~~~~~

                          MUX0

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:39:10: error: 'MUXI' was not declared in this scope

  pinMode(MUXI,INPUT);

          ^~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:39:10: note: suggested alternative: 'MUX0'

  pinMode(MUXI,INPUT);

          ^~~~

          MUX0

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'uint8_t RobotMotorBoard::parseCodename(uint8_t)':

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:136:11: error: 'TK1' was not declared in this scope

    return TK1;

           ^~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:138:11: error: 'TK2' was not declared in this scope

    return TK2;

           ^~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:140:11: error: 'TK3' was not declared in this scope

    return TK3;

           ^~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:142:11: error: 'TK4' was not declared in this scope

    return TK4;

           ^~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'uint8_t RobotMotorBoard::codenameToAPin(uint8_t)':

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:154:11: error: 'A11' was not declared in this scope

    return A11;

           ^~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:154:11: note: suggested alternative: 'A1'

    return A11;

           ^~~

           A1

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'void RobotMotorBoard::motorsWrite(int, int)':

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:192:15: error: 'IN_A1' was not declared in this scope

   analogWrite(IN_A1,speedR);

               ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:192:15: note: suggested alternative: 'PIN_A1'

   analogWrite(IN_A1,speedR);

               ^~~~~

               PIN_A1

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:193:15: error: 'IN_A2' was not declared in this scope

   analogWrite(IN_A2,0);

               ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:193:15: note: suggested alternative: 'PIN_A2'

   analogWrite(IN_A2,0);

               ^~~~~

               PIN_A2

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:195:15: error: 'IN_A1' was not declared in this scope

   analogWrite(IN_A1,0);

               ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:195:15: note: suggested alternative: 'PIN_A1'

   analogWrite(IN_A1,0);

               ^~~~~

               PIN_A1

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:196:15: error: 'IN_A2' was not declared in this scope

   analogWrite(IN_A2,-speedR);

               ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:196:15: note: suggested alternative: 'PIN_A2'

   analogWrite(IN_A2,-speedR);

               ^~~~~

               PIN_A2

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:200:15: error: 'IN_B1' was not declared in this scope

   analogWrite(IN_B1,speedL);

               ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:200:15: note: suggested alternative: 'INT1'

   analogWrite(IN_B1,speedL);

               ^~~~~

               INT1

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:201:15: error: 'IN_B2' was not declared in this scope

   analogWrite(IN_B2,0);

               ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:201:15: note: suggested alternative: 'PINB2'

   analogWrite(IN_B2,0);

               ^~~~~

               PINB2

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:203:15: error: 'IN_B1' was not declared in this scope

   analogWrite(IN_B1,0);

               ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:203:15: note: suggested alternative: 'INT1'

   analogWrite(IN_B1,0);

               ^~~~~

               INT1

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:204:15: error: 'IN_B2' was not declared in this scope

   analogWrite(IN_B2,-speedL);

               ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:204:15: note: suggested alternative: 'PINB2'

   analogWrite(IN_B2,-speedL);

               ^~~~~

               PINB2

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'virtual void RobotMotorBoard::motorsStop()':

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:212:14: error: 'IN_A1' was not declared in this scope

  analogWrite(IN_A1,255);

              ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:212:14: note: suggested alternative: 'PIN_A1'

  analogWrite(IN_A1,255);

              ^~~~~

              PIN_A1

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:213:14: error: 'IN_A2' was not declared in this scope

  analogWrite(IN_A2,255);

              ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:213:14: note: suggested alternative: 'PIN_A2'

  analogWrite(IN_A2,255);

              ^~~~~

              PIN_A2

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:215:14: error: 'IN_B1' was not declared in this scope

  analogWrite(IN_B1,255);

              ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:215:14: note: suggested alternative: 'INT1'

  analogWrite(IN_B1,255);

              ^~~~~

              INT1

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:216:14: error: 'IN_B2' was not declared in this scope

  analogWrite(IN_B2,255);

              ^~~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:216:14: note: suggested alternative: 'PINB2'

  analogWrite(IN_B2,255);

              ^~~~~

              PINB2

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'void RobotMotorBoard::_readTrim()':

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:271:23: error: 'TRIM' was not declared in this scope

  int value=analogRead(TRIM);

                       ^~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:271:23: note: suggested alternative: 'TSM'

  int value=analogRead(TRIM);

                       ^~~~

                       TSM

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'void RobotMotorBoard::_refreshMotorAdjustment()':

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:278:33: error: 'TRIM' was not declared in this scope

  motorAdjustment=map(analogRead(TRIM),0,1023,-30,30)/100.0;

                                 ^~~~

C:\Users\֣ʱ��\Desktop\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:278:33: note: suggested alternative: 'TSM'

  motorAdjustment=map(analogRead(TRIM),0,1023,-30,30)/100.0;

                                 ^~~~

                                 TSM

exit status 1
为开发板 Arduino Uno 编译时出错。

在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。


发表于 2021-1-4 08:37 | 显示全部楼层
从哪里搞来的代码 感觉缺了很多东西
发表于 2021-1-4 09:02 | 显示全部楼层
arduino robot是使用atmega32u4做主控的arduino机器人套件,可能是这个原因所以UNO无法编译相关程序
 楼主| 发表于 2021-1-5 13:01 | 显示全部楼层
正在编译项目...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_ROBOT_MOTOR -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8039 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Robot Motor"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\robot_motor" "-IC:\Users\閮戞椂涓僜Documents\Arduino\libraries\U8g2\src" "-IC:\Program Files (x86)\Arduino\libraries\Robot_Motor\src" "-IC:\Users\閮戞椂涓僜Documents\Arduino\libraries\U8glib\src" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "C:\Users\閮戞椂涓僜AppData\Local\Temp\arduino_build_979342\sketch\woodbox.ino.cpp" -o "C:\Users\閮戞椂涓僜AppData\Local\Temp\arduino_build_979342\sketch\woodbox.ino.cpp.o"
motor:1: error: expected ',' or '...' before numeric constant

In file included from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\io.h:144:0,

                 from c:\program files (x86)\arduino\hardware\tools\avr\avr\include\avr\pgmspace.h:90,

                 from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28,

                 from C:\Users\郑时七\AppData\Local\Temp\arduino_build_979342\sketch\woodbox.ino.cpp:1:

motor:1: error: expected ',' or '...' before numeric constant

使用 2.28.10  版本的库 U8g2 在文件夹: C:\Users\郑时七\Documents\Arduino\libraries\U8g2
使用 1.0.3  版本的库 Robot_Motor 在文件夹: C:\Program Files (x86)\Arduino\libraries\Robot_Motor
使用 1.19.1  版本的库 U8glib 在文件夹: C:\Users\郑时七\Documents\Arduino\libraries\U8glib
使用 1.0  版本的库 Wire 在文件夹: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire
使用 1.0  版本的库 SPI 在文件夹: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI
exit status 1
expected ',' or '...' before numeric constant
大佬果然强,错误少很多了,还剩下一处这是没加载库文件还是怎么
发表于 2021-1-5 13:31 | 显示全部楼层
把软件贴上来
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-29 16:36 , Processed in 0.076977 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表