• Dan
    August 7, 2017 at 10:52 #13715

    This thread is for discussion of all skycam/spidercam related stuff.

    Are you building a skycam? Are you interested in seeing development be done for you? Want to meet other skycam users? That kind of thing.

    A post about it is here: https://www.marginallyclever.com/2015/02/code-inverse-kinematics-spidercam-skycam/

    The skycam github project is here: https://github.com/MarginallyClever/Skycam

    Here’s a video of the first version in action

    Dan
    August 7, 2017 at 10:57 #13716

    Today at the request of some users I’ve updated the JAVA project to include Maven. From Eclipse if you Import > Existing Maven Project > and go to the project directory, it will find all the files and download the dependencies for you. Then you can right click on the project in Eclipse and choose Debug as > Java Application and it should run.

    The current check in is error-message free, which is not the same as bug-free. Also I understand there is a big desire to have the entire machine running on one control board. Nice! I’m working on it.

    Dan
    August 9, 2017 at 14:14 #13745

    Makelangelo-firmware now supports 4-motor machines like Zarplotter. It should be fairly painless from here to change the inverse kinematics to support Skycam systems.

    Dan
    August 9, 2017 at 18:05 #13747

    Skycam RUMBA code has been checked in. There’s a strange compiler bug that’s being misreported. it says some things are undefined when they’re clearly there AND they’re the same as in the Makelangelo firmware. I suspect poorly matched #ifdef #endif pairs, but I don’t know for sure.

    kukomiguel
    August 10, 2017 at 09:08 #13750

    Hi Dan,

    Thank you very much for your work on the skycam project.

    I have a RAMPS board, can I just get the pin definitions from Makelangelo firmware or do I need to do additional changes?

    Thanks.

    Dan
    August 10, 2017 at 09:33 #13751

    RAMPS pin definitions are in configure.h. change the #define MOTHERBOARD to be RAMPS instead of RUMBA and it should just work. I haven’t tested it, so please check it carefully and report back.

    kukomiguel
    August 10, 2017 at 09:51 #13752

    Hello Dan, RAMPS definitions in the configure.h file are missing. I only see the RUMBA ones.

    kukomiguel
    August 10, 2017 at 10:35 #13753

    I included RAMPS Definition from Makelangelo:
    // Your choice of board
    //#define MOTHERBOARD BOARD_RUMBA
    #define MOTHERBOARD BOARD_RAMPS

    #if MOTHERBOARD == BOARD_RUMBA

    #define HAS_SD // comment this out if there is no SD card
    #define HAS_LCD // comment this out if there is no SMART LCD controller

    #define MAX_MOTORS (6)

    #define MOTOR_0_DIR_PIN (16)
    #define MOTOR_0_STEP_PIN (17)
    #define MOTOR_0_ENABLE_PIN (48)
    #define MOTOR_0_LIMIT_SWITCH_PIN (37)

    #define MOTOR_1_DIR_PIN (47)
    #define MOTOR_1_STEP_PIN (54)
    #define MOTOR_1_ENABLE_PIN (55)
    #define MOTOR_1_LIMIT_SWITCH_PIN (36)

    // alternate pins in case you want to do something interesting
    #define MOTOR_2_DIR_PIN (56)
    #define MOTOR_2_STEP_PIN (57)
    #define MOTOR_2_ENABLE_PIN (62)
    #define MOTOR_2_LIMIT_SWITCH_PIN (35)

    #define MOTOR_3_DIR_PIN (22)
    #define MOTOR_3_STEP_PIN (23)
    #define MOTOR_3_ENABLE_PIN (24)
    #define MOTOR_3_LIMIT_SWITCH_PIN (34)

    #define MOTOR_4_DIR_PIN (25)
    #define MOTOR_4_STEP_PIN (26)
    #define MOTOR_4_ENABLE_PIN (27)
    #define MOTOR_4_LIMIT_SWITCH_PIN (33)

    #define MOTOR_5_DIR_PIN (28)
    #define MOTOR_5_STEP_PIN (29)
    #define MOTOR_5_ENABLE_PIN (39)
    #define MOTOR_5_LIMIT_SWITCH_PIN (32)

    #define NUM_SERVOS (1)
    #define SERVO0_PIN (5)

    #define LIMIT_SWITCH_PIN_LEFT (MOTOR_0_LIMIT_SWITCH_PIN)
    #define LIMIT_SWITCH_PIN_RIGHT (MOTOR_1_LIMIT_SWITCH_PIN)

    // Smart controller settings
    #define BEEPER 44
    #define LCD_PINS_RS 19
    #define LCD_PINS_ENABLE 42
    #define LCD_PINS_D4 18
    #define LCD_PINS_D5 38
    #define LCD_PINS_D6 41
    #define LCD_PINS_D7 40

    // Encoder rotation values
    #define BTN_EN1 11
    #define BTN_EN2 12
    #define BTN_ENC 43

    #if NUM_MOTORS > MAX_MOTORS
    #error “The number of motors needed is more than this board supports.”
    #endif

    #if MOTHERBOARD == BOARD_RAMPS
    #define MAX_AXIES (5)

    #define MOTOR_0_DIR_PIN (55)
    #define MOTOR_0_STEP_PIN (54)
    #define MOTOR_0_ENABLE_PIN (38)
    #define MOTOR_0_LIMIT_SWITCH_PIN (3) /* X min */

    #define MOTOR_1_DIR_PIN (61)
    #define MOTOR_1_STEP_PIN (60)
    #define MOTOR_1_ENABLE_PIN (56)
    #define MOTOR_1_LIMIT_SWITCH_PIN (14) /* Y min */

    // alternate pins in case you want to do something interesting
    #define MOTOR_2_DIR_PIN (48)
    #define MOTOR_2_STEP_PIN (46)
    #define MOTOR_2_ENABLE_PIN (62)
    #define MOTOR_2_LIMIT_SWITCH_PIN (18) /* Z Min */

    #define MOTOR_3_DIR_PIN (28)
    #define MOTOR_3_STEP_PIN (26)
    #define MOTOR_3_ENABLE_PIN (24)
    #define MOTOR_3_LIMIT_SWITCH_PIN (2) /* X Max */

    #define MOTOR_4_DIR_PIN (34)
    #define MOTOR_4_STEP_PIN (36)
    #define MOTOR_4_ENABLE_PIN (30)
    #define MOTOR_4_LIMIT_SWITCH_PIN (15) /* Y Max */

    #define NUM_SERVOS (4)
    #define SERVO0_PIN (11) /* Servo 1 */
    #define SERVO1_PIN (6)
    #define SERVO2_PIN (5)
    #define SERVO3_PIN (4)

    // Smart controller settings
    #define BEEPER 37 /* Pin on SMART Adapter */
    #define LCD_PINS_RS 16 /* Pin on SMART Adapter */
    #define LCD_PINS_ENABLE 17 /* Pin on SMART Adapter */
    #define LCD_PINS_D4 23 /* Pin on SMART Adapter */
    #define LCD_PINS_D5 25 /* Pin on SMART Adapter */
    #define LCD_PINS_D6 27 /* Pin on SMART Adapter */
    #define LCD_PINS_D7 29 /* Pin on SMART Adapter */

    // Encoder rotation values
    #define BTN_EN1 31 /* Pin on SMART Adapter */
    #define BTN_EN2 33 /* Pin on SMART Adapter */
    #define BTN_ENC 35 /* Pin on SMART Adapter */

    #define KILL_PIN 41 /* Pin on SMART Adapter */
    #endif

    kukomiguel
    August 10, 2017 at 10:38 #13754

    but i get a compile error:

    Arduino:1.8.3 (Mac OS X), Tarjeta:”Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

    In file included from /Users/Miguel/Dropbox/Architech/Skycam-master 3/skycamFirmwareRUMBA_v0_including_ramps/skycamFirmwareRumba.ino:12:0:
    configure.h:1: error: unterminated #ifndef
    #ifndef CONFIGURE_H
    ^
    exit status 1
    unterminated #ifndef

    Dan
    August 10, 2017 at 12:39 #13755

    Code finally compiles without error. On to testing!

    kukomiguel
    August 10, 2017 at 14:59 #13757

    Thank you Dan, it compiles. I added also de RAMPS definition and included an #if MOTHERBOARD == BOARD_RUMBA and endif to be able to change it.

    HELLO WORLD! I AM SKYCAM #-1
    Firmware v1
    == http://www.makelangelo.com/ ==
    M100 – display this message
    As well as the following G-codes (http://en.wikipedia.org/wiki/G-code):
    G00,G01,G02,G03,G04,G28,G90,G91,G92,M18,M101,M102,M103,M114

    Can you add a Teleport command and current possition to be able to move it as we could in previous 2012 version of Skycam?
    thanks

    kukomiguel
    August 10, 2017 at 15:18 #13758

    It would be nice if you could provide the first steps for setup (what variables need to be defined in the configuration files and examples on how to move and calibrate to start using it easily.
    I already have the prototype setup, I will connect the steppers to the board tomorrow and send you some pictures.

    Dan
    August 21, 2017 at 10:22 #13845

    Having gone as far as I want right now with https://www.marginallyclever.com/forums/topic/zarplotter-4-motor-drawing-machine/, I am confident the code works in a 2D plane. Now to add the 3rd dimension for skycam.

    Dan
    August 21, 2017 at 10:59 #13847

    update 7cf008fa3828cc075fa4ddf8e4e075436c8df783 improves IK and motor stepping. Also added PLOTTER_RADIUS and PLOTTER_Z for inverse kinematics.

    M101 Qnnn Xnnn Ynnn Znnn

    adjust the position of one motor.

    Q – the index of the motor. 0=NW, 1=NE, 2=SW, 3=SE.

    at least one X Y or Z value must be given to make effective change. nnn is a value in cm measured from the center of the work envelope (the area in which the plotter can move).

    M102

    report on the position of the four motors.

    D0 Qnnn Annn

    Jog one motor a given number of steps

    Q – the index of the motor. 0=NW, 1=NE, 2=SW, 3=SE.

    A value must be given to make effective change. nnn is a value in steps. for references, a 400 step motor at 1/16 microstepping and a 20-tooth gt2 pulley moves 160 steps in one mm of belt pull, or 6400 steps in one rotation.

    ajeromin
    August 22, 2017 at 14:42 #13868

    Thanks for the update! It got motor C moving again! 🙂

    May I ask a few questions please?:
    1. My rig is smaller, where do I define the dimensions/motor locations relative to 0,0,0 in the code? I haven’t been able to find it.

    2. I’m not quite ready to pass GCode via serial, so instead I want to simply change the position by some small amount in the main loop when I press a button. I tried calling:
    line_safe(1.0,1.0,1.0,2000);
    then, alternating:
    line_safe(-1.0,-1.0,-1.0,2000);

    but for some reason, the payload always moves straight up from 0,0,0, never in the negative direction. ideas?

    3. Am I correct in my understanding that 0,0,0 is on the floor at center of the four motors?

    thanks again!

    kukomiguel
    August 23, 2017 at 07:40 #13871

    Hello Dan,

    ¿Can you add RAMPS config in the code? I added manually the RAMPS configuration but I’m only able to move motor NW and NE, though I’m sending different “G0 Xxx Yyy F100 commands changing X or Y values. Not sure if I did something wrong.

    Also if mottors are NW:X, NE:Y, SW:Z SE:E0, Home position X0,Y0 is in the center of the plotter or next to what motor?

    Thank you very much.

    sillyString
    January 3, 2018 at 06:41 #15179

    hello im looking for some help.

    im looking to try and create the skycam project that is here.i see that its possible dated so not sure to get allot of replys.

    it will be the biggest thing i have tried and as there is lots of new things for me im just looking for a bit of and overview..

    from this folder https://github.com/MarginallyClever/Skycam what do i install from here..

    i see there is libs and there is arduino folder should i install this same ino to both arduino?https://github.com/MarginallyClever/Skycam/blob/master/arduino/arduino.ino
    but then i also see https://github.com/MarginallyClever/Skycam/blob/master/skycamFirmware/skycamFirmware.ino does this get installed to one of the arduinos?

    are the arduinos controled via usb ? bluetooth?

    bassically a little over view would be really helpfull to try it out…

    like whats the sd card for ?

    as you can see im just looking for an overview to get started really..

    if anyone can help it would be great.

    Dan
    January 3, 2018 at 11:35 #15180

    The latest version has been rolled into Makelangelo-firmware.

    set MACHINE_STYLE to SKYCAM.

    Yes, controlled via USB for direct-drive & setup.

    SD card if you have a long programmed sequence of moves.

    ajeromin
    January 9, 2018 at 07:10 #15228

    Thanks for the update, Dan!
    In Arduino IDE 1.8.4, when building the Makelangelo-firmware for Mega, with “MACHINE_STYLE to SKYCAM” (and all supporting headers are loaded too), it returns this error:

    Do you see the same when compiling the latest firmware for Skycam?
    Thanks!


    Arduino: 1.8.4 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\aaron\AppData\Local\Arduino15\packages -hardware C:\Users\aaron\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\aaron\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\aaron\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10804 -build-path C:\Users\aaron\AppData\Local\Temp\arduino_build_846326 -warnings=none -build-cache C:\Users\aaron\AppData\Local\Temp\arduino_cache_892336 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.arduinoOTA.path=C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avr-gcc.path=C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\aaron\Dropbox\Prototypes\SkyCam\Makelangelo-firmware-master\Makelangelo-firmware\Makelangelo-firmware.ino
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\aaron\AppData\Local\Arduino15\packages -hardware C:\Users\aaron\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\aaron\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\aaron\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10804 -build-path C:\Users\aaron\AppData\Local\Temp\arduino_build_846326 -warnings=none -build-cache C:\Users\aaron\AppData\Local\Temp\arduino_cache_892336 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.arduinoOTA.path=C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avr-gcc.path=C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\aaron\Dropbox\Prototypes\SkyCam\Makelangelo-firmware-master\Makelangelo-firmware\Makelangelo-firmware.ino
    Using board 'mega' from platform in folder: C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20
    Using core 'arduino' from platform in folder: C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20
    Detecting libraries used...
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\sketch\Makelangelo-firmware.ino.cpp" -o "nul"
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src" "C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\sketch\Makelangelo-firmware.ino.cpp" -o "nul"
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src" "-IC:\Program Files (x86)\Arduino\libraries\SD\src" "C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\sketch\Makelangelo-firmware.ino.cpp" -o "nul"
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src" "-IC:\Program Files (x86)\Arduino\libraries\SD\src" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\EEPROM\src" "C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\sketch\Makelangelo-firmware.ino.cpp" -o "nul"
    Using cached library dependencies for file: C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\sketch\MServo.cpp
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src" "-IC:\Program Files (x86)\Arduino\libraries\SD\src" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\EEPROM\src" "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src\SPI.cpp" -o "nul"
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src" "-IC:\Program Files (x86)\Arduino\libraries\SD\src" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\EEPROM\src" "C:\Program Files (x86)\Arduino\libraries\SD\src\File.cpp" -o "nul"
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src" "-IC:\Program Files (x86)\Arduino\libraries\SD\src" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\EEPROM\src" "C:\Program Files (x86)\Arduino\libraries\SD\src\SD.cpp" -o "nul"
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src" "-IC:\Program Files (x86)\Arduino\libraries\SD\src" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\EEPROM\src" "C:\Program Files (x86)\Arduino\libraries\SD\src\utility\Sd2Card.cpp" -o "nul"
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src" "-IC:\Program Files (x86)\Arduino\libraries\SD\src" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\EEPROM\src" "C:\Program Files (x86)\Arduino\libraries\SD\src\utility\SdFile.cpp" -o "nul"
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src" "-IC:\Program Files (x86)\Arduino\libraries\SD\src" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\EEPROM\src" "C:\Program Files (x86)\Arduino\libraries\SD\src\utility\SdVolume.cpp" -o "nul"
    Generating function prototypes...
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src" "-IC:\Program Files (x86)\Arduino\libraries\SD\src" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\EEPROM\src" "C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\sketch\Makelangelo-firmware.ino.cpp" -o "C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\preproc\ctags_target_for_gcc_minus_e.cpp"
    "C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\preproc\ctags_target_for_gcc_minus_e.cpp"
    Compiling sketch...
    Using previously compiled file: C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\sketch\MServo.cpp.o
    "C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\variants\mega" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI\src" "-IC:\Program Files (x86)\Arduino\libraries\SD\src" "-IC:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\EEPROM\src" "C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\sketch\Makelangelo-firmware.ino.cpp" -o "C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\sketch\Makelangelo-firmware.ino.cpp.o"
    In file included from C:\Users\aaron\AppData\Local\Temp\arduino_build_846326\sketch\Makelangelo-firmware.ino.cpp:1:0:

    C:\Users\aaron\Dropbox\Prototypes\SkyCam\Makelangelo-firmware-master\Makelangelo-firmware\robot_skycam.ino: In function 'void IK(float*, long int*)':

    robot_skycam:31: error: 'limit_ymax' was not declared in this scope

    dy = abs(y - limit_ymax)-SKYCAM_COMPENSATION; dx = abs(x - limit_xmin)-SKYCAM_COMPENSATION; L = sqrt(dx*dx+dy*dy+dz*dz); motorStepArray[0] = lround( L / THREAD_PER_STEP ); // M0 (top left)
    ^
    C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino/Arduino.h:94:18: note: in definition of macro 'abs'

    #define abs(x) ((x)>0?(x):-(x))
    ^
    robot_skycam:31: error: 'limit_xmin' was not declared in this scope

    dy = abs(y - limit_ymax)-SKYCAM_COMPENSATION; dx = abs(x - limit_xmin)-SKYCAM_COMPENSATION; L = sqrt(dx*dx+dy*dy+dz*dz); motorStepArray[0] = lround( L / THREAD_PER_STEP ); // M0 (top left)
    ^
    C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino/Arduino.h:94:18: note: in definition of macro 'abs'

    #define abs(x) ((x)>0?(x):-(x))
    ^
    robot_skycam:32: error: 'limit_xmax' was not declared in this scope

    dy = abs(y - limit_ymax)-SKYCAM_COMPENSATION; dx = abs(x - limit_xmax)-SKYCAM_COMPENSATION; R = sqrt(dx*dx+dy*dy+dz*dz); motorStepArray[1] = lround( R / THREAD_PER_STEP ); // M1 (top right)
    ^
    C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino/Arduino.h:94:18: note: in definition of macro 'abs'

    #define abs(x) ((x)>0?(x):-(x))
    ^
    robot_skycam:33: error: 'limit_ymin' was not declared in this scope

    dy = abs(y - limit_ymin)-SKYCAM_COMPENSATION; dx = abs(x - limit_xmin)-SKYCAM_COMPENSATION; U = sqrt(dx*dx+dy*dy+dz*dz); motorStepArray[2] = lround( U / THREAD_PER_STEP ); // M2 (bottom left)
    ^
    C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\cores\arduino/Arduino.h:94:18: note: in definition of macro 'abs'

    #define abs(x) ((x)>0?(x):-(x))
    ^
    Using library SPI at version 1.0 in folder: C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\SPI
    Using library SD at version 1.1.1 in folder: C:\Program Files (x86)\Arduino\libraries\SD
    Using library EEPROM at version 2.0 in folder: C:\Users\aaron\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.20\libraries\EEPROM
    exit status 1
    'limit_ymax' was not declared in this scope

    ajeromin
    January 9, 2018 at 07:17 #15229

    It occurs in this function:


    void IK(float *axies, long *motorStepArray) {
    //float limit_xmin = axies[0].limitMin;
    //float limit_xmax = axies[0].limitMax;
    //float limit_ymin = axies[1].limitMin;
    //float limit_ymax = axies[1].limitMax;

    float x = axies[0];
    float y = axies[1];
    float z = axies[2];

    float L,R,U,V,dy,dx,dz;

    dz = z;

    dy = abs(y - limit_ymax)-SKYCAM_COMPENSATION; dx = abs(x - limit_xmin)-SKYCAM_COMPENSATION; L = sqrt(dx*dx+dy*dy+dz*dz); motorStepArray[0] = lround( L / THREAD_PER_STEP ); // M0 (top left)
    dy = abs(y - limit_ymax)-SKYCAM_COMPENSATION; dx = abs(x - limit_xmax)-SKYCAM_COMPENSATION; R = sqrt(dx*dx+dy*dy+dz*dz); motorStepArray[1] = lround( R / THREAD_PER_STEP ); // M1 (top right)
    dy = abs(y - limit_ymin)-SKYCAM_COMPENSATION; dx = abs(x - limit_xmin)-SKYCAM_COMPENSATION; U = sqrt(dx*dx+dy*dy+dz*dz); motorStepArray[2] = lround( U / THREAD_PER_STEP ); // M2 (bottom left)
    dy = abs(y - limit_ymin)-SKYCAM_COMPENSATION; dx = abs(x - limit_xmax)-SKYCAM_COMPENSATION; V = sqrt(dx*dx+dy*dy+dz*dz); motorStepArray[3] = lround( V / THREAD_PER_STEP ); // M3 (bottom right)
    }

    Dan
    January 9, 2018 at 12:29 #15233

    That was very thorough 🙂

    Change the start like this:

    void IK(float *cartesian, long *motorStepArray) {
    float x = cartesian[0];
    float y = cartesian[1];
    float z = cartesian[2];

    float limit_xmax = axies[0].limitMax;
    float limit_xmin = axies[0].limitMin;
    float limit_ymax = axies[1].limitMax;
    float limit_ymin = axies[1].limitMin;

    Dan
    January 9, 2018 at 12:34 #15234

    An update with this fix has been published to the firmware master branch. Thank you for your help!

    ajeromin
    January 9, 2018 at 12:42 #15235

    Sorry.. hah. Verbosity level set too high.
    Compiled! I’ll test tonight. thank you Dan!

    Would you like me to edit the above to abbreviate?

    ajeromin
    January 10, 2018 at 18:20 #15246

    Is there any guide for the proper passage of G Code to the Mega for Skycam?

    I understand GCode and can make the motors all move in different increments by sending via serial, for instance: G01 X0.5 Y0.75 Z1.0
    but they all move the same speed and amount, so the weight at center of strings just moves up or down.

    Whats the trick to getting the motors to each move the appropriate amount in order to place the weight at the desired X,Y,Z in the volume?

    Thanks!

Viewing 25 posts - 1 through 25 (of 50 total)

You must be logged in to reply to this topic.

0
Save & Share Cart
Your Shopping Cart will be saved and you'll be given a link. You, or anyone with the link, can use it to retrieve your Cart at any time.
Back Save & Share Cart
Your Shopping Cart will be saved with Product pictures and information, and Cart Totals. Then send it to yourself, or a friend, with a link to retrieve it at any time.
Your cart email sent successfully :)