housewithinahouse / TwoWheelRobotLibrary

TwoWheelRobot: a library that simplifies commands to move a two wheeled robot
MIT License
3 stars 2 forks source link

Error on compile #2

Closed puskyer closed 2 years ago

puskyer commented 2 years ago

Hello Just learning on how to use some of the adafruit devices I purchased years ago, found your library in the Arduino Library and was trying to use .it.

I have a Mini Round Robot Chassis Kit - 2WD with DC Motors DC Motor + Stepper FeatherWing Add-on For All Feather Adafruit Feather M0 Bluefruit LE FeatherWing Doubler - Prototyping Add-on For All Feather

if I just the Adafruit test code, I can get the Robot to move, if I try to compile your library I get the following errors. If you have time, could you point me to what I need to do to get it working please.

I have not made any changes, compiled the example that was in the library.

Thank you

/home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:62:6: error: default argument given for parameter 1 of 'void TwoWheelRobot::forward(int)' 62 | void TwoWheelRobot::forward(int segment_length = _default_segment_length) | ^~~~~ In file included from /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:7: /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.h:41:10: note: previous specification in 'void TwoWheelRobot::forward(int)' here 41 | void forward(int segment_length = _default_segment_length); | ^~~ /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:71:6: error: default argument given for parameter 1 of 'void TwoWheelRobot::backward(int)' 71 | void TwoWheelRobot::backward(int segment_length = _default_segment_length) | ^~~~~ In file included from /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:7: /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.h:42:10: note: previous specification in 'void TwoWheelRobot::backward(int)' here 42 | void backward(int segment_length = _default_segment_length); | ^~~~ /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:80:6: error: default argument given for parameter 1 of 'void TwoWheelRobot::right(int)' 80 | void TwoWheelRobot::right(int segment_length = _default_segment_length) | ^~~~~ In file included from /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:7: /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.h:44:10: note: previous specification in 'void TwoWheelRobot::right(int)' here 44 | void right(int segment_length = _default_segment_length); | ^~~~~ /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:89:6: error: default argument given for parameter 1 of 'void TwoWheelRobot::left(int)' 89 | void TwoWheelRobot::left(int segment_length = _default_segment_length) | ^~~~~ In file included from /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:7: /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.h:43:10: note: previous specification in 'void TwoWheelRobot::left(int)' here 43 | void left(int segment_length = _default_segment_length); | ^~~~ /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:98:6: error: default argument given for parameter 1 of 'void TwoWheelRobot::backwardRight(int)' 98 | void TwoWheelRobot::backwardRight(int segment_length = _default_segment_length) | ^~~~~ In file included from /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:7: /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.h:48:10: note: previous specification in 'void TwoWheelRobot::backwardRight(int)' here 48 | void backwardRight(int segment_length = _default_segment_length); | ^~~~~ /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:107:6: error: default argument given for parameter 1 of 'void TwoWheelRobot::forwardRight(int)' 107 | void TwoWheelRobot::forwardRight(int segment_length = _default_segment_length) | ^~~~~ In file included from /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:7: /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.h:47:10: note: previous specification in 'void TwoWheelRobot::forwardRight(int)' here 47 | void forwardRight(int segment_length = _default_segment_length); | ^~~~ /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:116:6: error: default argument given for parameter 1 of 'void TwoWheelRobot::backwardLeft(int)' 116 | void TwoWheelRobot::backwardLeft(int segment_length = _default_segment_length) | ^~~~~ In file included from /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:7: /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.h:46:10: note: previous specification in 'void TwoWheelRobot::backwardLeft(int)' here 46 | void backwardLeft(int segment_length = _default_segment_length); | ^~~~ /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:125:6: error: default argument given for parameter 1 of 'void TwoWheelRobot::forwardLeft(int)' 125 | void TwoWheelRobot::forwardLeft(int segment_length = _default_segment_length) | ^~~~~ In file included from /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.cpp:7: /home/pusky/Arduino/libraries/TwoWheelRobot/src/TwoWheelRobot.h:45:10: note: previous specification in 'void TwoWheelRobot::forwardLeft(int)' here 45 | void forwardLeft(int segment_length = _default_segment_length); | ^~~ exit status 1 Error compiling for board Adafruit Feather M0.

puskyer commented 2 years ago

ok after much research on the internet could not find any reason for the error. So i decided to change boards from Adafruit Feather M0 Bluefruit LE to a Adafruit Feather 32u4 Adalogger and it complies great.. so it is an Adafruit compiler error for the M0.