1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Need advices about marlin upgrade

Discussion in 'General Questions' started by tiagomaricate, Aug 23, 2020.

  1. tiagomaricate

    tiagomaricate Member

    Joined:
    Jul 5, 2020
    Messages:
    102
    Likes Received:
    19
    Hi people!

    Since I started to follow this forum I ventured to do some changes on R2.

    I started from scratch and learned a lot.

    Today I'm running the last version of rasbian and the last version of octopi with a new interface on display.

    Now id like to explore the marlin.

    Is there any advice about trying to upgrade Merlin to the last version?
     
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    22,725
    Likes Received:
    7,244
    It should work OK, but you need to review the changes between Marlin 1.x and Marlin 2.0.
    You can probably take your CONFIGURATION.H from Marlin 1.1.x (what the Robo R2 is running) and merge them into the configuration for Marlin 2.0.

    I have not personally worked with Marlin 2 yet, someone else might have given it a shot.
     
    tiagomaricate likes this.
  3. tiagomaricate

    tiagomaricate Member

    Joined:
    Jul 5, 2020
    Messages:
    102
    Likes Received:
    19
  4. tkoco

    tkoco - -.- --- -.-. ---
    Staff Member

    Joined:
    May 7, 2018
    Messages:
    687
    Likes Received:
    260
    Which display? The LCD on the R2 or the web browser logged into Octopi?
     
  5. tkoco

    tkoco - -.- --- -.-. ---
    Staff Member

    Joined:
    May 7, 2018
    Messages:
    687
    Likes Received:
    260
    I've looked at the configuration.h files for both versions. The differences between the two is substantial. You might make a copy of the version 2.x configuration.h file before merging in the appropriate settings from the older file.
     
  6. tiagomaricate

    tiagomaricate Member

    Joined:
    Jul 5, 2020
    Messages:
    102
    Likes Received:
    19
    I created this splashscreen...
    [​IMG]

    And using the Octoscreen

    [​IMG]
     
    mark tomlinson likes this.
  7. tiagomaricate

    tiagomaricate Member

    Joined:
    Jul 5, 2020
    Messages:
    102
    Likes Received:
    19
    I'm using an app called Kaleidoscope to compare/verify both files and merge only pieces of code.
    It is a long file... more than 2k lines... but I will do.
     
  8. tiagomaricate

    tiagomaricate Member

    Joined:
    Jul 5, 2020
    Messages:
    102
    Likes Received:
    19
    Is this correct?
    I was imagining all the use min plug should be on and all the use max plug should be off.

    It was from here: https://github.com/WheresWaldo/Marlin_for_R2/blob/dev/Marlin/Configuration.h

    Code:
    // Specify here all the endstop connectors that are connected to any endstop or probe.
    // Almost all printers will be using one per axis. Probes will use one or more of the
    // extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
    
    #define USE_XMIN_PLUG
    //#define USE_YMIN_PLUG  //[robo]
    #define USE_ZMIN_PLUG
    //#define USE_XMAX_PLUG
    #define USE_YMAX_PLUG  //[robo]
    #define USE_ZMAX_PLUG  //[robo]
     
  9. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    22,725
    Likes Received:
    7,244
  10. tiagomaricate

    tiagomaricate Member

    Joined:
    Jul 5, 2020
    Messages:
    102
    Likes Received:
    19
    I can be completely wrong or understood wrong, but looks the X and Y have only the min plug right? Is that the lever button next to the drivers?
    If so, there is one for each axis (the Z axis have one under the case.
     
  11. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    22,725
    Likes Received:
    7,244
    The C2 only has MIN switches for X, Y. Those are AXIS minimums. However the C2 (and likely the R2 have the Z axis inverted so the max height (depth really because the bed goes down) has a switch and they use the UV sensor to detect that the nozzle is on the bed (which would be the Z min)
     
  12. tiagomaricate

    tiagomaricate Member

    Joined:
    Jul 5, 2020
    Messages:
    102
    Likes Received:
    19
    But in the code the Y axis is ”inverted”... I thought should be like X axis.
     
  13. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    22,725
    Likes Received:
    7,244
    Could be -- it controls if the minimum of the Y is the bed front or bed back.
     
  14. tiagomaricate

    tiagomaricate Member

    Joined:
    Jul 5, 2020
    Messages:
    102
    Likes Received:
    19
    I finished to merge configuration and configuration advanced for marlin 2.x.

    I will try using the configs from the file above. If don't work, I recompile.
     
    mark tomlinson likes this.
  15. tiagomaricate

    tiagomaricate Member

    Joined:
    Jul 5, 2020
    Messages:
    102
    Likes Received:
    19
    Well, not so bad...

    Or I'm doing very wrong or as some syntax changed from the original firmware, I have to find these values:

    Code:
    #error"Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN requires the Z_MIN_PIN to be defined."
    #error"CASE_LIGHT_ENABLE requires CASE_LIGHT_PIN to be defined."
    #error"HEATER_0_PIN not defined for this board."
    #error"TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board."
     
  16. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    22,725
    Likes Received:
    7,244
    Check the definitions in

    pins_ROBOC2.h

    Even for the R2 that is what the file is named that calls out the pins for the Robo control board.
     
    tiagomaricate likes this.
  17. tiagomaricate

    tiagomaricate Member

    Joined:
    Jul 5, 2020
    Messages:
    102
    Likes Received:
    19
    Perfect! I didn't know it was for both printers. Are the boards the same?
    Also, what do you recommend to update the firmware?
    So far I can see a way to do by wifi, also by USB... only (maybe) using a bootloader with raspberry, but I'm not sure if it demands other connections.
     
  18. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    22,725
    Likes Received:
    7,244
    The only difference is that the C2 board does not have a bed heater connected. Other than that electrically I am fairly positive the boards are identical.

    The best way to update the firmware is to use the Arduino IDE on the Raspberry Pi. Use SSH or VNC to get onto the Pi then:

    sudo apt install arduino

    or...

    mkdir -p ~/Applications
    cd ~/Applications
    wget https://downloads.arduino.cc/arduino-1.8.5-linuxarm.tar.xz
    tar xvJf arduino-1.8.5-linuxarm.tar.xz cd arduino-1.8.5/
    ./install.sh rm ../arduino-1.8.5-linuxarm.tar.xz

    You can see what the latest version is using this:
    curl -s https://www.arduino.cc/en/Main/Software | grep -o 'arduino-.\..\..-linuxarm'

    Then swap that version in place of the 1.8.5 I used above

    Download your source to the Pi, run the Arduino IDE and update the firmware.

    The alternative is to compile the firmware into a HEX file (on any computer) and let OctoPrint update it for you
     
    #18 mark tomlinson, Aug 29, 2020
    Last edited: Aug 29, 2020
    tiagomaricate likes this.
  19. tiagomaricate

    tiagomaricate Member

    Joined:
    Jul 5, 2020
    Messages:
    102
    Likes Received:
    19
    So basically R2 is a tall brother of C2...

    I have the hex file, but on octoprint plugins, the firmware update is disabled. I cant select a file.


    Enviado do meu iPhone usando Tapatalk
     
  20. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    22,725
    Likes Received:
    7,244
    Pretty much. If OctoPrint won't let you do it then you need to do it the hard way I guess.

    Really not that hard, just get the IP address for the printer and use SSH to get to the Pi, then make sure VNC is running and you can use a VNC client on any PC to open up a virtual monitor for the Pi and do everything else in the Raspbian Desktop.

    On a PC putty makes a decent SSH client https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

    the logon credentials for the Pi are unchanged from the default one Raspbian uses on any of the pi images.
     

Share This Page