loading

It would be interesting to be able to manage your 3d printer without having a cable attached to your PC. Most people have tried it out using raspberry pi. Initially, I bought this bought for some other projects but it has been lying around for quite sometime. This board has 2 USB 2.0, VGA, HDMI, RS232, ethernet, SATA, SPDIF and some GPIO ports. So, I thought why not try out the Octoprint. Let's get started.

Step 1: Step 1: Setting Up Cubietruck

The cubietruck is a dual core ARM board by default the wifi is disabled. If you are using the ethernet instead, the wifi setup is optional. In order to perform the setup, you need a monitor and a keyboard. The cubietruck supports both VGA and HDMI. However, these options are done when selecting the image for this board.

Wifi:

1. Login to lubuntu: linaro/linaro

2. add bcmdhd to /etc/modules (need to reboot)

3. Add nameserver 8.8.8.8 to /etc/resolv.conf ( without this, the system will be connected to the wifi but no internet access)

4. Reboot

Step 2: Step 2: Adding External Harddisk

The image is loaded into the internal NAND RAM. To speed things up and add more space to the system, I have connected a 2.5" harddisk to the SATA port on-board. The system files can be moved to the harddisk by performing the following steps:

Moving the rootfs to harddisk:

1. sudo su - root --> change to root user

2. mkdir /tmp/1 /tmp/target

3. mount /dev/nandb /tmp/1

4.fdisk -l -> to locate your drive, sda? sdb?

5.fdisk /dev/sda

4. mkfs.ext4 /dev/sda1

5. mount /dev/sda1 /tmp/target

6. (cd /tmp/1; tar --backup -c *) |tar -C /tmp/target -xv

7. mount /dev/nanda /mnt/

8. vi /mnt/uEnv.txt (Change root=/dev/sda1)

9. sync

10. umount /mnt

11. reboot

Step 3: Step 3: Installing Octoprint

Install subversion at get pyserial for the Ramps 1.4 to connect with Cubietruck:

1. sudo apt-get install subversion

2. svn checkout svn://svn.code.sf.net/p/pyserial/code/trunk pyserial-code cd pyserial-code cd pyserial python setup.py build sudo python setup.py install

Install Python related packages and clone the Octoprint devel source for the latest development.

1. cd ~

2. sudo apt-get install python-pip python-dev git git clone https://github.com/foosel/OctoPrint.git

3. cd OctoPrint

4. git pull git checkout devel sudo python setup.py install

After that, ./run to run the Octoprint server. It will be hosted in 0.0.0.0:5000 locally on the Cubietruck. You can also access it through other devices by replacing the 0.0.0.0 with the Cubietruck IP.

Step 4: Step 4: Adding Webcam

Additionally, you can also add webcam to stream the video of the print. Install the related packages and clone mjpg-streamer:

1. cd ~

2. sudo apt-get install subversion libjpeg8-dev imagemagick libav-tools cmake

3. git clone https://github.com/jacksonliam/mjpg-streamer.git

4. cd mjpg-streamer/mjpg-streamer-experimental

5.make

To test out the video stream: ./mjpg_streamer -i "./input_uvc.so -y" -o "./output_http.so -w ./www" You should be able to get the life feed from your USB webcam using port 8080 with the Cubietruck IP or 0.0.0.0 locally in Cubietruck.

Step 5: Finally: Attach Your Printer to Cubietruck Usb

Now your printer can be access locally through the web interface.

<p>Got a Problem i can&acute;t solve. everything is fine until sthe installation of octoprint. there i got an error Processing netaddr-0.7.19.tar.gz</p><p>Writing /tmp/easy_install-ENjJvA/netaddr-0.7.19/setup.cfg<br>Running netaddr-0.7.19/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ENjJvA/netaddr-0.7.19/egg-dist-tmp-VXnJfn<br>warning: no files found matching 'release.py'<br>error: Setup script exited with error: No space left on device</p><p>but there is about 118GB space free</p>
<p>Did you run in normal user or sudo mode? One problem could be your root is full. </p>
<p>All done. Prolem was a size of /tmp about 20mb. And another way like the tutorial:</p><p>01.) Login to lubuntu: linaro/linaro</p><p>02.) sudo vi /etc/modules (add bcmdhd)</p><p>03.) sudo vi /etc/resolv.conf (Add nameserver 8.8.8.8)</p><p>04. sudo vi /etc/apt/sources.list </p><p>change to deb http://old-releases.ubuntu.com/ubuntu/ raring main universe</p><p>deb-src http://old-releases.ubuntu.com/ubuntu/ raring main universe</p><p>05.) sudo vi /etc/fstab (change the size to about 200mb)</p><p>06.) Reboot</p><p>07.) sudo apt-get update</p><p>08.) sudo apt-get upgrade</p><p>09.) sudo su - root</p><p>10.) mkdir /tmp/1 /tmp/target</p><p>11.) mount /dev/nandb /tmp/1</p><p>12.) fdisk -l</p><p>13.) mkfs.ext4 /dev/sda1</p><p>14.) mount /dev/sda1 /tmp/target</p><p>15.) (cd /tmp/1; tar --backup -c *) |tar -C /tmp/target -xv</p><p>16.) mount /dev/nanda /mnt/</p><p>17.) vi /mnt/uEnv.txt (Change root=/dev/sda1)</p><p>18.) sync</p><p>19.) umount /mnt</p><p>20.) reboot</p><p>21.) sudo apt-get install python-pip python-dev git </p><p>22.) sudo apt-get install subversion</p><p>23.) svn checkout svn://svn.code.sf.net/p/pyserial/code/trunk pyserial-code </p><p>24.) cd pyserial-code/pyserial </p><p>25.) python setup.py build </p><p>26.) sudo python setup.py install</p><p>27.) cd ~</p><p>28.) git clone https://github.com/foosel/OctoPrint.git</p><p>29.) cd OctoPrint</p><p>30.) git pull git checkout devel sudo python setup.py install</p><p>31.) octoprint serve</p>
done with sudo, sudo -i
<p>awesome, many thanks</p>
<p>Really amazing.You like literally developed a base platform. From here on you can add so much additional functionality which is limitless.Thank you for taking time to create this.You did a great Job</p>
<p>Very nice. Thanks for sharing this tutorial, I think a lot of people will find it useful!</p>
<p>Thanks for the compliment ;)</p>

About This Instructable

2,535views

13favorites

License:

More by zhenning:Historical building 3d lamp shade Setting Up Octoprint web interface for 3d printer on Cubietruck Multi 3d printer head carriage 
Add instructable to: