Using a Raspberry Pi as a RepRap print host with webcam

I set up a Raspberry Pi as a print host for my RepRap (using the Pi Camera Board as a webcam to view the print status). Here are my summary steps:

  1. Install Rasberrian and update it.
  2. Configure your system to enable wifi (if used) and camera board (if used) and enable the SSH server if you want to remotely administer the pi board using the “sudo raspi-config” command (you may also want to tweak your overclocking settings here, I’m using “Moderate”)
  3. Install OctoPrint following directions here: https://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian
  4. If you have a camera board, you may need to update your pi firmware (sudo apt-get install rpi-update; sudo rpi-update)
  5. To get the camera board set up as a streaming webcam, install mjpg-streamer experimental version from here:
    “git clone https://github.com/jacksonliam/mjpg-streamer”
  6. You can compile it on the Pi using these instructions:
    http://www.instructables.com/id/Create-an-internet-controlled-robot-using-Livebots/step5/Get-the-webcam-streamer-for-Raspberry-Pi/ (ignoring the step to download from sourceforge.net)
  7. Install the plugins to /usr/local/lib with “sudo make install”. Copy the www directory to the same location.
  8. Start the webcam streamer: mjpg_streamer -o “/usr/local/lib/output_http.so -w /usr/local/lib/www” -i “/usr/local/lib/input_raspicam.so -x 640 -y 480”
  9. Start OctoPrint (“OctoPrint/run”)
  10. Test it by pointing your browser to your raspberry pi’s IP address, port 8080 for the mjpg-stream and port 5000 for OctoPrint
  11. When all that works, put some commands in your /etc/rc.local file to start them both up whenever your Pi boot sup. I used: su pi -c ‘/home/pi/OctoPrint/run’ & AND su pi -c ‘/usr/local/bin/mjpg_streamer -o “/usr/local/lib/output_http.so -w /usr/local/lib/www” -i “/usr/local/lib/input_raspicam.so -x 640 -y 480” ‘ &

My Thoughts: Everything works great on a wired (ethernet) connection, but my wifi adapter is performing extremely poorly for streaming video of the printer. Also, why can’t the camera board just have V4L support out of the box?

Leave a Reply

Your email address will not be published. Required fields are marked *