GithubHelp home page GithubHelp logo

cedstrom / arducamfocus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from moof-src/arducamfocus

0.0 1.0 0.0 5.48 MB

repository for ArduCamFocus octoprint plugin. Control an ArduCam focus from octoprint on an octopi.

Python 85.15% JavaScript 6.92% Jinja 7.93%

arducamfocus's Introduction

ArduCamFocus

This plugin controls the focus on an ArduCam Motorized Focus Camera. https://www.arducam.com/docs/cameras-for-raspberry-pi/motorized-focus-camera/

screenshot

It uses a custom @ARDUCAMFOCUSSET FOCUS command that can be incorporated within your slicer to automatically adjust focus while printing. You can also send relative adjustments with @ARDUCAMFOCUS 50 or @ARDUCAMFOCUS -50

Example: @ARDUCAMFOCUSSET 300 will set the focus to 300.

Video Example

Pre-Installation Requirements

Please follow the manufacturer's instructions:

This plugin uses I2C to communicate with the camera. That is not enabled by default. The ArduCamFocus plugin will not function until you enable I2C. ssh to your octopi and enter this commands (this only needs to be done once):

if ! grep -Fxq "^#ArduCamFocus$" /boot/config.txt; then
sudo cat << end_of_file >> /boot/config.txt
#ArduCamFocus
dtparam=i2c_vc=on
dtparam=i2c_arm=on
end_of_file
fi

After executing the above command, the file /boot/config.txt should now have the commands to enable I2C. In addition, you have to enable the I2C kernel module using raspi-config. Again, ssh to your octopi, and then enter this command:

sudo raspi-config
  1. select "5 Interfacing Options"
  2. select "P5 I2C"
  3. raspi-config will ask, "Would you like the ARM I2C interface to be enabled?"
  4. select "Yes"
  5. you should see, "The ARM I2C interface is enabled"
  6. select "Finish"

You may also need to install the following packages:

libilmbase-dev libopenexr-dev libgstreamer1.0-dev python-smbus i2c-tools libgtk-3-0

After you reboot, the camera should become operational in OctoPrint.

Disclaimer

Although I use this plugin and it works for me without issues, I take no resposiblity for any damage caused by using this plugin. Your camera version, i2c address, or system configuration may be different from mine. Please make sure to do your reseach and understand the dangers and please be careful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.