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

Robo flavored Raspberry Pi / OctoPrint

Discussion in 'Mods and Upgrades' started by WheresWaldo, Nov 12, 2016.

  1. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
  2. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    There are a few interesting bits that Robolabs put together to control the new Robo C2/R2 printers. This is an attempt to duplicate what Robo has done, getting it to work on the older R1/R1+PLUS printers.

    Hardware Prerequisites:
    • Working Robo R1 or R1+PLUS 3D printer
    • Raspberry Pi 2 or 3
    • Raspberry Pi compatible touchscreen
    Software Prerequisites:
    • Robo should have Marlin version 1.1.0-RC7 or above. It may work with earlier versions of Marlin but the C2/R2 use v1.1.0-RC? and my test R1 printer uses 1.1.0-RCBugFix.
    • Raspberry Pi should either have Raspian Jessie and a working installation of OctoPrint or use the Raspian/OctoPi build supplied by GuySoft. My method will outline putting it all together from nothing. You would need to remove functionality from OctoPi to get certain functions to work.
    • Proper drivers for your particular touchscreen installed and properly configured.
    Other Stuff:
    • Network Cable or WiFi adapter
    • Micro USB Power adapter to power the rPi. Or a way to power it from the Robo RAMPS board.
    • USB cable (preferably short)
    • Some sort of 3D printed case to house your rPi and touchscreen
    Here we go!

    The following steps will assume a rudimentary knowledge of how to setup a linux distro on a Raspberry Pi and is not intended as a complete step by step tutorial.
    1. Install Lite or Server version of Raspian/Armbian Jessie
      • Follow all set up prompts to get to the first command prompt
      • Set up new user on first boot, I chose robo in my setup
      • Connect to your LAN and make sure your distribution is up to date
      • Code:
        sudo apt-get update && sudo apt-get upgrade
    2. Install Kivy, a software libary used by the Robo theme plugin for OctoPrint
      • Armbian or other Linux distro
        Code:
        sudo add-apt-repository ppa:kivy-team/kivy
        sudo apt-get update
        sudo apt-get install python-kivy
      • If you are installing on an rPi follow these instruction instead
        Code:
        sudo apt-get update
        sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \
           pkg-config libgl1-mesa-dev libgles2-mesa-dev \
           python-setuptools libgstreamer1.0-dev git-core \
           gstreamer1.0-plugins-{bad,base,good,ugly} \
           gstreamer1.0-{omx,alsa} python-dev cython
        sudo pip install git+https://github.com/kivy/kivy.git@master
    3. If you are using a WiFi dongle and want to make sure you are always connected install the netconnectd server daemon. Follow the instructions found here: https://github.com/foosel/netconnectd
    4. Install Octoprint per instructions on this page using the basic setup: https://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian
      • Note that if you get an error that virtualenv command not found you will need to execute the following command immediately after cd OctoPrint,
        Code:
        sudo pip install virtualenv --upgrade.
        virtualenv venv
      • You may need to add the robo user to the dialout group and tty so that the user can access the serial ports:
        Code:
        sudo usermod -a -G tty robo
        sudo usermod -a -G dialout robo
    5. Start Octoprint server
      Code:
      ~/OctoPrint/venv/bin/octoprint
    6. If you want to slice on your rPi or OctoPrint Server you will need to either get the pre-compiled version of CuraEngine for Raspian or build it yourself. Instructions are found here: https://github.com/foosel/OctoPrint/wiki/Plugin:-Cura
    The majority of the next steps are performed inside of OctoPrint and continue in the next post.
     
    #2 WheresWaldo, Nov 12, 2016
    Last edited: Nov 12, 2016
  3. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Inside OctoPrint
    Install some plugins in OctoPrint
    When you first run Octoprint in your favorite browser you will be asked to add a user or disable authentication. Do not disable authentication. If you want to keep it simple, create a user that is identical to the one you created for your linux distro. In my case that was robo.
    Log into OctoPrint with your newly created user
    Go to Settings and create a printer profile matching the specs of your Robo R1
    Select it as the default profile (you can delete the default installation printer if you like)
    In the Serial Connections check the Auto-connect to printer on server start box
    Install a bunch of plugins before any of the Robo created stuff
    Custom Control Editor (0.2.1)
    EEPROM Marlin Editor Plugin (0.1.0)
    STL Viewer (0.3.1)

    Netconnectd Client (0.1)
     
    #3 WheresWaldo, Nov 12, 2016
    Last edited: Nov 15, 2016
  4. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    This is a work in progress, I am still trying to figure out how Robo assembled all the pieces. The end result that I would love to see is a version of what currently runs the C2/R2 running on the Robo R1 series. So far there are just a few things running but a lot of stuff on the todo list. As soon as I get time and figure out exactly what I did to get here I will update the 2nd and 3rd posts.

    As an FYI I am not running this on a Raspberry Pi, but rather a similar SBC. The method I have to use to get everything running differs slightly from a straight rPi/OctoPi installation. In addition my 'server' is hardwired to my network and not using WiFi. I will not be able to run the linux netconnectd service without WiFi, so that functionality is not included.

    I am also hoping that this becomes a jumping point for others to add more functionality.

    One more note, this is currently up and running without a physical connection to a Robo printer so there are just some things that will not function properly until it is connected.
     
    #4 WheresWaldo, Nov 12, 2016
    Last edited: Nov 12, 2016
    mark tomlinson likes this.
  5. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,597
    Likes Received:
    7,311
    I have done a lot lately perforce with Octopi to support the delta so if you need a hand I might can help.
     
  6. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Thanks @mark tomlinson I might need some help. Right now it is just about learning the differences between an rPi running Raspian and the OrangePi running Armbian. Armbian is making me do everything twice, while claiming raspberry Pi compatibility it behaves much more like Debian Linux and less like Raspian. I also don't have a working touchscreen yet so all I can do is test the web connectivity. I do have the OrangePi setup in a PIP window on my 43" monitor but that is not touchscreen and it seems to run a version of X-Windows by default.

    At some point I will re-image my Raspberry Pi 2, but it is working so well that I don't want to sacrifice it for this project just yet.
     
    mark tomlinson likes this.
  7. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Here is the SBC I am using, it sells for under $20 and has all the features of the rPi 2/3 but runs a bit faster. Support is a lot less than an actual rPi but there is enough similarities that a lot of things just work the same. Please note that I am using a more generic Debian based distribution rather than the Raspian distro.

    HTB12KvFJFXXXXXvXXXXq6xXFXXXt[1].jpg

    This SBC was purchased for another project that eventually got scrapped. It has been sitting in a drawer for over a year and now this is the perfect time to put this to some good use.

    The OrangePi SBC's are available directly from OrangePi in their Alibaba store.

    If I were starting from scratch I would probably just get a genuine Raspberry Pi 3.
     
    #7 WheresWaldo, Nov 12, 2016
    Last edited: Nov 18, 2016
  8. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Trying to compare this to the Robo created Raspian Jessie image shows that their setup is actually pretty minimal. I will try to highlight the differences as I explore further.
     
    mark tomlinson likes this.
  9. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,597
    Likes Received:
    7,311
    Not shocking :)
    Not software folks.
     
  10. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    I am in the process of rebuilding my OctoPrint server, loaded their image on a new microSD card so I could look at it. Now trying to duplicate that from scratch since I am using a different touchscreen that their image includes. That's how I found out it didn't really have much installed.
     
  11. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Slightly delayed. Decided to abandon the OrangePi PC and go with a straight Raspberry Pi 3 instead. Now just have to wait until it gets here. Along with the new v2 8Mp Pi camera and a 4" IPS HDMI touchscreen.
     
  12. danzca6

    danzca6 Well-Known Member

    Joined:
    Jul 27, 2015
    Messages:
    2,161
    Likes Received:
    1,077
    I hope if this doesn't work out with the Robo that you have uses for all these new toys you ordered.
     
  13. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Yeah, not a problem. I needed the Pi for another project anyway. and the screen will work with TouchUI so I have no issues there.
     
  14. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,597
    Likes Received:
    7,311
    The new v2 camera is -- odd. It works, but is a little more of a hassle to get setup/working (at the OS level, not with Octoprint).
    Also not quite as sharp focused.
     
  15. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Focus can always be adjusted, that is why the lenses screw on. But I will watch for any peculiarities in the OS setup. I am still going to try to get OctoPrint up and running on the OrangePi, shame not to use it for something so simple. Besides don't need it for it's original purpose as an XBMC player, moved on to Roku and Plex Server for that.
     
  16. anngeelow81

    anngeelow81 Member

    Joined:
    May 20, 2016
    Messages:
    41
    Likes Received:
    9
    Another great contribution to the community @WheresWaldo
     
  17. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Progress
    20161118_184228.jpg
     
    danzca6 likes this.
  18. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    A sad realization

    After spending two days away from things I would rather be doing like spending time with my family. I am now going to roll this project back some. It will only include the Robo themed OctoPrint. I may try to include Alexa and other support.

    I have been fighting the Robo created user interface and come to the conclusion that it was created with very specific hardware requirements. It would take a near complete rewrite of the code to make it work universally just to account for different screen resolutions. In my opinion this is poor programming practice as rPi hardware is all over the place with respect to available modifications and hardware versions. Even the display size is hardcoded and rewritten over the configuration files everytime it boots up. So while I could get it to display the UI, I actually can't interact with it. There are other UI's available for OctoPrint some without these restrictions. I am off to hunt them down.
     
  19. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    I am still working on trying to get the Robo theme working properly on an RPi 2/3. I have a few open tickets on the github for Robo all related to css. No word when they will look at them. For those only interested in the theme or if you just want to try it out load a plugin in OctoPrint using this URL:


    It will load like any other plugin except that there are some visual issues and they did not choose BLUE as the default color.
     
  20. AllenMcAfee

    AllenMcAfee Guest

    @WheresWaldo This is Allen from the Robo team. Apologies as not having weighed into this conversation earlier, but I don't have much time to track the forums. A lot of the early work you were doing was based on work from earlier this year while we were still in hardware design. Since then most of the critical plugins that are new have been under private repos. We've implemented a Kaa IoT to keep all the RoboOS enabled printers up to date, and we're working to obscure any IoT sensitivities. We will be open sourcing most of the apps we've developed like RoboLCD, but the factory OS build process and the IoT modules have not yet been decided on how we'll proceed. I hope you understand.

    As far as developing on RPi vs Orange Pi, we abandoned the Orange Pi pretty early on after we discovered we'd need a lot of kernel work to make the other software and components we needed to work. Plus they carry no safety or compliance certifications, so they would be unusable for us anyways. Once we're back from the holiday break, we will address the issues you've posted.
     

Share This Page