Experimental OpenFrameworks addon for EggBot/EiBotBoard control
- 🖋️ Pen Control:
setPenState()
,togglePen()
,isPenDown()
- ⚙️ Motion Control:
- Basic Movement:
moveAbsolute()
,moveLowLevel()
,moveTimed()
- Advanced Movement:
moveStepperMixedAxis()
,drawLine()
,drawPolygon()
- Status:
isMoving()
,waitForCompletion()
- Basic Movement:
- 🎛️ I/O Operations:
- Analog:
getAnalogValues()
,configureAnalogInput()
- Digital:
getDigitalInputs()
,setDigitalOutputs()
,setPinMode()
,getPin()
,setPin()
- Analog:
- 🔍 Status Queries:
- Motion:
getGeneralStatus()
,getMotorStatus()
- Hardware:
getCurrentInfo()
,getStepPositions()
,getButtonState()
- Configuration:
getLayer()
,getNickname()
,getVersion()
- Motion:
- 🛠️ Reliability Features:
- Robust command response handling
- Timeout detection and recovery
- Specialized handling for different command formats
- Clone this repository and copy the
ofxEbbControl
folder into your OFaddons/
directory. - Ensure that
ofxEbbControl.h
andaddon_config.mk
are included. - Use the Project Generator to add ofxEbbControl to your project.
This addon supports OpenFrameworks v0.12.0. Compatibility with other versions is not guaranteed.
#include "ofMain.h"
#include "ofxEbbControl.h"
class ofApp : public ofBaseApp {
public:
ofxEbbControl board;
void setup() {
if (!board.setup("/dev/ttyUSB0")) {
ofLogError() << "⚠️ Failed to open EBB port";
std::exit(1);
}
board.clearStepPosition();
board.setPenState(false);
}
void draw() {
board.moveAbsolute(1000, 1000, 0);
board.setPenState(true);
}
};
int main() {
ofSetupOpenGL(1024,768,OF_WINDOW);
ofRunApp(new ofApp());
}
- Command Response Handling: Enhanced error handling for command responses, especially for the
QM
command (Query Motors) which has a specific response format - Timeout Fixes: Improved timeout detection and handling across all command types
- Response Format Detection: Added specific handling for various command response formats (V, QG, QM, etc.)
- Response Cleaning: Better cleanup of responses including handling of CR/LF characters
- The implementation may not handle all edge cases in EBB response formats
- The JS to C++ port might have subtle differences in behavior
- Some commands may require specific firmware versions (see EBB documentation)
- See
src/ofxEbbControl.h
for full API docs and method descriptions - The complete EBB command reference is available at Evil Mad Scientist: EBB Command Set
This addon is released under the MIT License. See LICENSE for details.