OpenMoCo AVR Libraries

The OpenMoCo AVR Libraries provide a suite of libraries for DIY motion control and similar applications running on the Arduino and other AVR-based platforms.  These libraries are released under a GPLv3 license.

NOTE: The OpenMoCo AVR Libraries are now maintained in our GitHub account, download latest versions from here directly: OpenMoCo AVR Libraries

Several core libraries are provided to make developing new motion control applications on the AVR platform easier and within reach of nearly any developer.  Key activities used in nearly every motion control rig are represented with easy-to-use C++ classes for the Arduino environment which handle complex tasks with the highest level of features - allowing developers to focus on their business logic and interfaces, without having to re-implement common base-level capabilities.

The following libraries are provided:

OMState

A simple, extremely light-weight state engine for quickly and easily implementing complex workflow where actions have dependencies without having to write large sections of IF/ELSE chains.

OMCamera

A complete camera control library (for remote camera control using a wired remote port) implementing all capabilities of a remote camera control in a non-blocking fashion, easy to use callback design allows you to trigger an action without having to check on its status, or implement your own timers.  Allows for focus control, exposure control, and exposure delay all with simple methods and no blocking timers.

OMMotor

An advanced stepper control library provides non-blocking motion in continuous or point-in-time moves.  In addition to continuous and point-in-time moves, it also allows for easy interleaved (i.e. shoot-move-shoot) motion with just a few simple method calls.  This is a high-performance library which allows you to make extremely complex moves with real-time acceleration and deceleration profiles with a single method call.  All motion is non-blocking, allowing you to make complex moves with a single method call while your code does other activities.  Uses a simple callback mechanism to gain information about when moves begin and complete.  This stepper library is the only non-blocking stepper library for the Arduino that allows for real-time complex curve calculations at speeds up to 5,000 steps/second while requiring no interaction with the library once the move has been requested.

OMMoCoBus

Core protocol library for the MoCoBus protocol, used by the OMMaster and OMNode libraries.

OMMoCoNode

Core library automating all aspects of creating a new device to reside on a MoCoBus Bus.  Simply sub-class this and implement a new node type that can speak the full MoCoBus protocol in minutes, with no need to handle communication intricacies, timeouts, data manipulation, etc.

OMMoCoMaster

Core library automating all aspects of creating an interface to a new MoCoBus Node Device.  This library allows developers of new device types to easily create an interface class to their device so that other developers may speak to their device without issue.  Handles all core protocol capabilities, so one only needs to create named methods for the specific commands which the device receives.

OMComHandler

Core library for handling common line communication between devices on a MoCoBus bus.  Handles master/slave timing signals, and more in the future.

OMEEPROM

Simple EEPROM storage management, versioning, and more.

OMMenuMgr

Advanced automatic menu management for a user interface, providing the ability to handle user input values, actions, sub-menus, and much more.  Requires very little code to provide a rich menu experience on any character-based display.



Release Versionsort icon Platform Download Notes
1.11
Microsoft Windows
Linux
Apple OS X
nanoMoCo
Generic AVR
ATMega328p
Arduino
Version 1.11 Release
1.1
Microsoft Windows
Linux
Apple OS X
nanoMoCo
ATMega328p
Arduino
Version 1.1 Release
1
Microsoft Windows
Linux
Apple OS X
nanoMoCo
ATMega328p
Arduino
Version 1.0 Release
0.01
MX2
nanoMoCo
Generic AVR
ATMega328p
Arduino
Initial Alpha Release
  • Arduino version 1.0 or newer
  • An arduino, nanoMoCo, or arduino-compatible board


Copy libraries into standard Arduino library location, restart Arduino IDE.

OpenMoCo AVR Libraries 1.11

  • OMEEPROM switched to templates to reduce code
  • OMMenuMgr
    • Added support for Bit Flag (set one bit in a byte) input types
    • Added support to Automatically write values to EEPROM (via OMEEPROM)
    • Fixed numerous navigation issues
    • Large efficiency gains in flash size

OpenMoCo AVR Libraries 1.1

  •  Added OMEEPROM
  •  Added OMMenuMgr
  •  Abstracted direct pin and register/flag references in libraries to allow for re-definition

 OMComHandler:

  •     Added triggers to COM1 and COM2, with length of time triggered
  •     Switched master timing signal to COM3


 OMMotor:

  •     Automatically re-calculating distance to home when ms changes
  •     Fixed a bug wherein a home command after a continuous move would fail to operate


  • Now supports Arduino 1.0
  • Includes broadcast command capabilities

0.01

Initial alpha release of OpenMoCo AVR Libraries