Using OctoPrint

## ***Using OctoPrint OctoPi for Raspberry Pi***

*Using OctoPrint - Revision 1 - 25/11/2020 - Chris White*

**[Document In Draft - Rev1]**

**PLEASE NOTE: This guide has been tested on V 2.2.1 Firmware. Other firmware between these versions have not been tested.**

This page will provide a guide and provide information for the use of OctoPi with Rotrics DexArm.

Image Courtesy of Chris White

### What you will need...

For this configuration, you will need the following items...

**Physical Items - B.O.M**

1. Qty 1 - Raspberry Pi 3B, 3B+ or 4 Board
2. Qty 1 - Micro SD Card
3. Qty 1 - Micro SD Card Reader
4. Qty 1 - Wall Socket Charger with "USB Socket" Outlet
5. Qty 1 - USB Cable
	1. Raspberry Pi 3 Users - USB-A to Micro-USB Type Cable
	2. Raspberry Pi 4 Users - USB-A to USB-C Type Cable

**Applications**

1. PuTTY (Free) - For SSH Connection (https://www.putty.org/) (Used for SSH Connection when asked in the OctoPrint Guide.)
2. NotePad++ or Equivalent (Typically Free) (https://notepad-plus-plus.org/downloads/) (Used for configuring your WiFi Network Settings in the "octopi-wpa-supplicant.txt" file when asked in the OctoPrint Guide.)

### Installing OctoPrint Octopi

Download Octopi from the link below, and follow the guide for installation carefully.

https://octoprint.org/download/

When asked for SSH, use the free app available online called PuTTy.

Here is a Screenshot of how to use PuTTy. Simply enter octopi.local into the address and click Open.
Click Yes to confirm you are happy to Connect to the Raspberry Pi.
Enter the Username and Password as specified in the OctoPrint user guide linked above.
When you have finished this guide, the OctoPi will be powered on, and ready for the below steps. If the Raspberry Pi is not located near the DexArm - disconnect it and re-locate it so that it can be connected to the DexArm via USB cable.

Re-Connect Power to the Raspberry Pi so that it is powered up.

### USB Connection the DexArm

1. Using the USB-A to USB-C cable provided with the DexArm, plug the USB-C cable into the rear of the DexArm in the USB-C ported marked "1".
2. Plug the other end of the USB cable (USB-A) into one of the USB sockets on the Raspberry Pi.

### Complete the OctoPi Setup

1. Go to the web browser and connect to your OctoPi (http://octopi.local)

2. Follow the Wizard to complete the setup...

**Access Control**

Needs to be configured to further secure your OctoPi against malicious intent. Choose a strong password.

**Anonymous Usage Tracking**

This is a method of feeding back data to OctoPrint so they can improve their software. Choose what is right for you.

**Online Connectivity Check**

Enabling this allows the OctoPi to detect if everything is OK with your Internet Connection.

**Plugin Blacklist**

This is to ensure security on your device by allowing OctoPi to check a blacklist before letting you install a Plug-In.

**Default Printer Profile**

This needs to be configured specifically for the DexArm. Make sure you complete each of the sections which are linked on the right hand pane at the top (General, Print Bed & Build Volume etc.).

For DexArm these settings are:

**Form Factor:** Rectangular

**Origin:** Centre

**Heat Bed:** Unticked

**Width:** To suit your own bed size (Rotrics Glass Bed is 150mm)

**Depth:** To suit your own bed size (Rotrics Glass Bed is 150mm)

**Height:** DexArm Height should be set to 270mm

Finish the Wizard and you should be presented with the main OctoPi Control Panel.

## Using the Custom Control Editor Plug-In

This Plug-In is designed to simply the deployment of Custom G-Code commands in Octo-Pi. These improve the functionality of the DexArm by allowing us to re-create some functions that we have used before either as manual g-code commands or as functions in Rotrics Studio.

When at the Octo-Pi Main Dashboard, click the "Spanner / Wrench" Icon at the top of the Page to access the OctoPrint Settings window.

Open Settings
When the OctoPrint Settings window opens, click the Plugin Manager on the left side pane. Then click the "Get More" button on the right main pane.

Plugin Manager > Get More
When the Plugin Browser opens, search in the search box for "Custom Control Editor". When the plugin appears, click the "Install" button.

Search for "Custom Control Editor" > Click Install
When it's complete, it will ask you to restart. Click "Restart Now" at the prompt.

Click "Restart Now"
Once OctoPi has re-started, click the OctoPrint Settings Wrench Icon again at the top.

You should now see "Custom Control Editor" now listed in the "Plugins" section, bottom left. Click On it.

The right hand pane should have a green rectangle. Right-Click this Rectangle and click "Create Container". This is how you will create a group or folder for custom G-Code Command Buttons that you can use again and again.

In this instance, I created a container called "DexArm Commands" as the Container is a way of Grouping commands.

Select the Layout as "Horizontal" and click the "Confirm" button.

Type in the Name for your Container, Set the Layout and Click Confirm.
Now, Right Click on the new Container and choose "Create Command > Command".

Insert the name for the command. I am using "Home & Zero Axis". In the Commands box, add the G-Code that you want the command to run.

In this case I choose....

**M1112** - Send DexArm to Home

**G92 X0 Y0 Z0** - Set all Axis to Zero at current position

Click the "Confirm" button when you are finished.

Set the Name for your Command Button, enter the Commands you want it to Run and then click Confirm.
Click the "Save" button in the OctoPrint Settings Menu (bottom right).

Now back on the Dashboard view, click the "Control" tab at the top between Temperature and GCode Viewer.

You can see your new Container and Button which are now ready for use.