I do have a 3D printer. It is time to put it on the net 🙂
So I decided to install OcptoPi.
Just downloaded the image, unpacked it and copied to a microSD (check this to how to write image to SD/microSD card).
I had to add to file “octopi-network.txt” the ip address that will be provided by my router (192.168.1.81).
I connected my Raspberry to my home wifi which provided me a nice interface with OctoPrint Server up and running at http://192.168.1.81/. Then my iPrusa i3 to the raspberry through USB serial communication at 115200 speed and i could control the motors, upload gcodes to the OctoPi.
There are many other features and plugins provided by OctoPrint, but the one I was interested into is the ability to watch the camera stream attached to the raspberry Pi.
I decided to use the kinect for three reason:
- I already own one
- It has a camera (640×480 pixels @ 30 Hz – RGB)
- I am planning to turn it in 3D scanner….
Bu, first I had to make it work, since as i attached it was not working right away.
What I want to be able to see what is happening to my printer while I am printing, wherever I am. So I had to stream the video to a web page. This feature is provided by an already setup software called mjpg-streamer.
mjpg-streamer is a command line application that copies JPEG frames from one or more input plugins to multiple output plugins. It can be used to stream JPEG files over an IP-based network from a webcam to various types of viewers such as Chrome, Firefox, Cambozola, VLC, mplayer, and other software capable of receiving MJPG streams.
Let’s see what will happen…
Connect than check the video http://192.168.1.79:8080/stream.html
change the configuration file in /boot/octopi.txt in
camera=”usb” (it will check only usb camera
and camera_usb_options=”-r 640×480 -f 10″
but not working
dmesg getting
gspca_kinect: [Stream 80] Invalid magic 6928
however the lsusb is working
Bus 001 Device 005: ID 045e:07f8 Microsoft Corp.
Bus 001 Device 009: ID 045e:02ae Microsoft Corp. Xbox NUI Camera
Bus 001 Device 007: ID 045e:02b0 Microsoft Corp. Xbox NUI Motor
Bus 001 Device 008: ID 045e:02ad Microsoft Corp. Xbox NUI Audio
So let’s try to install the open SDK for kinect
The libfreenect is the library that will make it work on linux
I used as reference this post
http://blog.tunpixel.tn/2014/10/27/kinect-rasp/
sudo apt-get install build-essential python-dev ipython python-opencv [10 min]
sudo apt-get install python-numpy python-scipy [4 min]
..
and more:
https://www.raspberrypi.org/forums/viewtopic.php?t=69223&p=503875