Wednesday, August 13, 2014

Cubietruck + Octoprint

Octoprint Cubietruck

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

sudo apt-get install subversion
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.

cd ~
sudo apt-get install python-pip python-dev git
git clone https://github.com/foosel/OctoPrint.git
cd OctoPrint
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.

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

cd ~
sudo apt-get install subversion libjpeg8-dev imagemagick libav-tools cmake
git clone https://github.com/jacksonliam/mjpg-streamer.git
cd mjpg-streamer/mjpg-streamer-experimental
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.