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.
1. Login to lubuntu: linaro/linaro
2. add bcmdhd to /etc/modules (need to reboot)
3. Add nameserver 22.214.171.124 to /etc/resolv.conf ( without this, the system will be connected to the wifi but no internet access)
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?
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)
10. umount /mnt
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
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.