Another compilation problem
Shop › Forum › Makelangelo Polargraph Art Robot › Another compilation problem
Tagged: Adafruit_StepperMotor, compilation, error
- This topic has 11 replies, 2 voices, and was last updated 8 years, 4 months ago by Anonymous.
-
AuthorPosts
-
2016-09-21 at 10:31 #10997AnonymousInactive
Hello everybody, hello Dan,
I’m trying to build a makelangelo on Arduino Uno + Adafruit MotorShield 2.3.
I use 2 NEMA-17 stepper motors and my Arduino software is 1.6.11.
I don’t manage to compile the firmware, so I’v got some questions for you guys, if you can help 🙂Here is my configuration for
firmware_ams
://------------------------------------------------------------------------------ // CONSTANTS //------------------------------------------------------------------------------ #define MOTHERBOARD 2 // Adafruit Motor Shield 2 //#define MOTHERBOARD 1 // Adafruit Motor Shield 1 #if MOTHERBOARD == 2 // stacked motor shields have different addresses. The default is 0x60 // 0x70 is the "all call" address - every shield will respond as one. #define SHIELD_ADDRESS (0x60) #endif // machine style #define POLARGRAPH2 // uncomment this line if you use a polargraph like the Makelangelo //#define COREXY // uncomment this line if you use a CoreXY setup. //#define TRADITIONALXY // uncomment this line if you use a traditional XY setup. // Increase this number to see more output #define VERBOSE (0) // Comment out this line to disable SD cards. //#define USE_SD_CARD (1) // Comment out this line to disable findHome and limit switches //#define USE_LIMIT_SWITCH (1) // which motor is on which pin? #define M1_PIN (1) #define M2_PIN (3) // which limit switch is on which pin? #define L_PIN (2) #define R_PIN (5) #define STEPPER_STEPS_PER_TURN (200.0) // I use NEMA-17 StepperMotors = 200 steps/rev. | 12V | 350mA #define MICROSTEPPING_MULTIPLIER (16.0) #define STEPS_PER_TURN (STEPPER_STEPS_PER_TURN*MICROSTEPPING_MULTIPLIER) #define NUM_TOOLS (6)
1/ “motor pin” : do I have to set M1 / M2 / M3 / M4, where motors are plugged in on MotorShield ? I set 1 for M1&M2 and 3 for M3&M4…
2/ “limit switch” : I don’t know what to set there ?
3/ When I compile, here’s the error :
Arduino : 1.6.11 (Mac OS X), Carte : "Arduino/Genuino Uno" /var/folders/85/qpp7hk751s7g_l6d7ny3xn2c0000gn/T//ccU86DGW.ltrans0.ltrans.o: In function
line(float, float, float)’:
ccU86DGW.ltrans0.o:(.text+0x1120): undefined reference to `Adafruit_StepperMotor::onestep(unsigned char, unsigned char)’
ccU86DGW.ltrans0.o:(.text+0x114a): undefined reference to `Adafruit_StepperMotor::onestep(unsigned char, unsigned char)’
ccU86DGW.ltrans0.o:(.text+0x136c): undefined reference to `Adafruit_StepperMotor::onestep(unsigned char, unsigned char)’
ccU86DGW.ltrans0.o:(.text+0x1396): undefined reference to `Adafruit_StepperMotor::onestep(unsigned char, unsigned char)’
/var/folders/85/qpp7hk751s7g_l6d7ny3xn2c0000gn/T//ccU86DGW.ltrans0.ltrans.o: In function `setFeedRate(float)’:
ccU86DGW.ltrans0.o:(.text+0x1522): undefined reference to `Adafruit_StepperMotor::setSpeed(unsigned int)’
ccU86DGW.ltrans0.o:(.text+0x1538): undefined reference to `Adafruit_StepperMotor::setSpeed(unsigned int)’
/var/folders/85/qpp7hk751s7g_l6d7ny3xn2c0000gn/T//ccU86DGW.ltrans1.ltrans.o: In function `main’:
ccU86DGW.ltrans1.o:(.text.startup+0x2cc): undefined reference to `Adafruit_MotorShield::begin(unsigned int)’
ccU86DGW.ltrans1.o:(.text.startup+0x2da): undefined reference to `Adafruit_MotorShield::getStepper(unsigned int, unsigned char)’
ccU86DGW.ltrans1.o:(.text.startup+0x2f0): undefined reference to `Adafruit_MotorShield::getStepper(unsigned int, unsigned char)’
ccU86DGW.ltrans1.o:(.text.startup+0x638): undefined reference to `Adafruit_StepperMotor::release()’
ccU86DGW.ltrans1.o:(.text.startup+0x644): undefined reference to `Adafruit_StepperMotor::release()’
ccU86DGW.ltrans1.o:(.text.startup+0x828): undefined reference to `Adafruit_StepperMotor::onestep(unsigned char, unsigned char)’
ccU86DGW.ltrans1.o:(.text.startup+0x83a): undefined reference to `Adafruit_StepperMotor::onestep(unsigned char, unsigned char)’
ccU86DGW.ltrans1.o:(.text.startup+0x84c): undefined reference to `Adafruit_StepperMotor::onestep(unsigned char, unsigned char)’
ccU86DGW.ltrans1.o:(.text.startup+0x85e): undefined reference to `Adafruit_StepperMotor::onestep(unsigned char, unsigned char)’
ccU86DGW.ltrans1.o:(.text.startup+0x13ca): undefined reference to `Adafruit_StepperMotor::onestep(unsigned char, unsigned char)’
/var/folders/85/qpp7hk751s7g_l6d7ny3xn2c0000gn/T//ccU86DGW.ltrans1.ltrans.o:ccU86DGW.ltrans1.o:(.text.startup+0x140c): more undefined references to `Adafruit_StepperMotor::onestep(unsigned char, unsigned char)’ follow
/var/folders/85/qpp7hk751s7g_l6d7ny3xn2c0000gn/T//ccU86DGW.ltrans2.ltrans.o: In function `global constructors keyed to 65535_0_AFMotorDrawbot.cpp.o.2230′:
ccU86DGW.ltrans2.o:(.text.startup+0xae): undefined reference to `Adafruit_MotorShield::Adafruit_MotorShield(unsigned char)’
collect2: error: ld returned 1 exit status
exit status 1
Erreur de compilation pour la carte Arduino/Genuino Uno`I’ve tried to resolve the problem with “Adafruit_StepperMotor” variable, in vain…
Do you have any idea where the problem could be and how I could resolve it ? I’m sorry if this is newbie question, but… I’m a newbie ^^Thx in advance 🙂2016-09-21 at 10:39 #10999DanKeymasterWe don’t officially support AMS2, it’s a pretty slow board so we never bothered. IIRC some features appear in code because dedicated DIY users sent in the code.
You should not have to change M1_PIN or M2_PIN. There is no support for limit switches in the AMS 1 or 2. We tried that in the past and could not make it work reliably.
It looks like your version of arduino can’t find the firmware_ams/Adafruit_MotorShield/Adafruit_MotorShield.* files. This is a problem since Arduino ~1.6.7. Move the Adafruit_MotorShield.* files to the firmware_ams/ folder and change
#include "Adafruit_MotorShield/Adafruit_MotorShield.h"
to say
#include "Adafruit_MotorShield.h"
2016-09-21 at 12:00 #11002AnonymousInactiveThanks a lot Dan, settings are now ok and compilation too 🙂
I didn’t know about AMS2 : do you estimate it can run nevertheless ? I really want to finalize this fantastic project…There is still 2 main problems :
1/ Servo motor makes much noise (as if it can’t stop turning on one side) and get very hot
2/ when I press “start” button on makelangelo software (7.8.0), nothing happens… just the lower-left part of the image get green, and the progress bar doesn’t move (stay at 0,00%). Here is the configuration of my software :
Connect OK Machine #-1 => settings = -// MACHINE - Model : Makelangelo 3+ - Machine width: 552,0 mm - Machine height: 783,0 mm - Acceleration : 250,0 - LEFT [x] invert => [IN] [OUT] buttons doesn't run ! -// PAPER - Paper size : A4 - Margin : 10% -// PEN - Diameter : 1,5 - Max Speed : 3500,0 - Up : 50,0 => [Test] doesn't run ! - Down : 90,0 => [Test] doesn't run ! - Lift Delay : 50,0 Manual driving - buttons OK - Speed : 6500,0 - [Pen Up] and [Pen Down] doesn't run ! Creative Control => seems OK, I can open and manage images Animation control => [Start] doesn't run ! Just a little bit of green and nothing on progress bar...
Don’t know what can be wrong… ?! Or, there are many things I don’t really understand yet, so I could have pass by an error without seeing it…
2016-09-21 at 13:18 #11011DanKeymasterThe software is sending commands to the robot but the robot is not saying “I finished, give me more.”
The robot should send back “> ” when it is ready for more.2016-09-21 at 13:29 #11012AnonymousInactiveWhere should I see “>” ? On Arduino Serial Monitor ?
Servo’s noise (and hot temp.) could explain why the software doesn’t run ? More exactly : problem at the origin of servo’s noise could explain that ?
2016-09-21 at 13:31 #11013DanKeymasterYes, on the serial monitor. Also in the advanced window (minimized at the bottom of makelangelo software)
servo? possibly.
2016-09-21 at 14:00 #11016AnonymousInactiveOh, yes, I didn’t see that, thank you !
Here is the message after I [Set home] and [Start] :HELLO WORLD! I AM DRAWBOT #-1
HELLO WORLD! I AM DRAWBOT #-1 Firmware v5M100 - display this message Completed Converting /Users/guillaume/Desktop/POLARGRAPH/Makelangelo/temp.ngc 3003 line segments. 1270.1161cm Estimated draw time: 9m10s . G92 X0.0 Y174.5 D6 X0 Y174.5 M110 N0 N0 G90;*43
Doesn’t run anything after displaying that message…
2016-09-21 at 14:10 #11017DanKeymasterIt should keep sending >. The fact that it does not is a problem. Maybe disconnect the servo and see if that makes it better.
2016-09-25 at 03:27 #11069AnonymousInactiveHello Dan, I’m back after testing a few settings 🙂
I decided to unplug servo from board and comment all lines for servo into firmware, so that I wanted to see if everything runs well.
=> Firmware compilation OK
=> Arduino Serial Monitor message :��d3�(Ps�:�”�c�J�KΓ���K���
HELLO WORLD! I AM DRAWBOT #-1 HELLO WORLD! I AM DRAWBOT #-1 Firmware v5M100 - display this message M101 [Tx.xx] [Bx.xx] [Rx.xx] [Lx.xx] - display/update board dimensions. As well as the following G-codes (http://en.wikipedia.org/wiki/G-code): G00,G01,G02,G03,G04,G28,G90,G91,G92,M18,M114 > > > (∞)
The robot is waiting… All seems OK
=> Software advanced windows message :
�V�� HELLO WORLD! I AM DRAWBOT #-1 HELLO WORLD! I AM DRAWBOT #-1 Firmware v5M100 - display this message Completed Converting /Users/guillaume/Desktop/POLARGRAPH/Makelangelo/temp.ngc 3003 line segments. 1270.1161cm Estimated draw time: 9m10s . G92 X0.0 Y174.5 D6 X0 Y174.5 M110 N0 N0 G90;*43
Then nothing happens ! Progress bar does’nt move and motors don’t run…
=> I didn’t calibrate the “Manual driving” section (for example : I let speed on 6500,0steps/min…)
=> I always have to click on “Set home” to activate “Start” button
=> When I click on “Start” button, this message appears :M110 N0 N0 G90;*43
and then… vortex mode !
Do you have any idea where this problem can come from, and how to solve it ? I feel so close to it…
2016-09-25 at 11:31 #11074DanKeymasterYou have to hit set home once so the robot knows where it is. If you hit set home when the pen holder is not at the home position…. expect strange results.
vortex mode?
2016-09-25 at 12:01 #11078AnonymousInactiveThanks Dan, I’ll try this.
Vortex mode is a kind of metaverse which catch you when something very very strange is happening to you…2016-10-01 at 09:44 #11168AnonymousInactiveWell, it could be a problem of power : USB + 9V batery aren’t enough ^^ I’ll try with a 12V supply…
-
AuthorPosts
- You must be logged in to reply to this topic.