I want to build an interactive art installation where an object hanging from the ceiling and is moved in an XY plane. Additionally there will be two steppers that pull ropes and a third one that controls the rotation of the object. I thought of adapting the LowRider2 CNC. Construction wise this seems like a good start. The movement is too slow. But using bigger GT2 pulleys this might me OK. Some communication via Bluetooth or WIFI is needed for the interactive part. I am struggling with the choice of the controller.
I need code that works like this:
loop(){
input = read_input_from_bluetooth();
new_servo_positions = calculate_next_position(input);
move_to_pos_non_blocking(new_servo_positions);
}
The movement needs to continue while in input is read and to be overridden when the new position is calculated.
The LowRider2 uses a RAMBo or a Ramps 1.4 Stack. Both are meant for 3d printing and can control enough servos. They use a Firmware like Marlin. In 3d printing the movements are usually blocking, since the print head should always move to the specified position and continue when it is reached. I need the opposite. Due to this interactivity, I think that I need a more low level approach. I am a bit stuck here.
Options that I see:
A) Use an existing 3d printing board; install Marlin; send gcode commands via usb from a second device like a Raspberry Pi
Seems overly complex
B) Use an existing 3d printing board; write a custom logic that does the control manually
Seems like the best option but I struggle to find a good abstraction layer.
C) Build everything by hand using a plain Arduino + some stepper shield
Seems too extreme.
What are your thoughts? Is it a good approach to misuse an Arduino compatible 3dp board? Are there good libraries that do the hardware abstraction without going too far into the direction of 3d printing?