Arduino library for controlling generic Dragonframe Motion Controllers. It handles translating raw messages into code events as well as creating and sending appropriate responses. You still need to implement your own communication channel as well as handling of all the events.
For a complete example of implementation, please refer to https://github.com/KarolStola/DragonframeWithOpti
Please note, that the implementation currently does not support the motion blur handling. Feel free to submit the merge or feature request if you'd like it to be added.
- Install prerequisite library: https://github.com/KarolStola/DelayedTasks
- Clone the repository to your sketchbook library location. The path can be set/viewed in
File > Preferences > Settings
. Put the library in thelibraries
folder.
- Implement the interface of
DragonframeDevice
. - Create global instance of
DragonframeDevice
. - Create global Instance of
DrafonframeMotionController
and pass the implementedDragonframeDevice
as an argument to the constructor. - Call the
DragonframeMotionController::Update()
function in thevoid loop()
.
#include <Arduino.h>
#include <DragonframeMotionController.h>
#include "MyDragonframeDevice.h"
MyDragonframeDevice myDevice;
DragonframeMotionController motionController(myDevice);
void setup()
{
}
void loop()
{
motionController.Update();
}