The parts I updated for final projects are :
- add 3d printed joints - modify Input devices - add another board for Output device - solve communications - add CNC-cut structureEverything works seperately fine. But once I try to make communication from capacitive to activate the motors, I found a problem : There's a conflict between the two Arduino libraries : Servo.h and VirtualWire.h
It gave this error:
libraries\VirtualWire\VirtualWire.cpp.o: In function `__vector_11': C:\Users\ambhika\Documents\Arduino\libraries\VirtualWire/VirtualWire.cpp:591: multiple definition of `__vector_11' libraries\Servo\avr\Servo.cpp.o:C:\Program Files (x86)\Arduino\libraries\Servo\src\avr/Servo.cpp:81: first defined here collect2.exe: error: ld returned 1 exit status exit status 1 Error compiling for board Arduino/Genuino Uno.
After searching for that error, I found this article in which suggest to use Servertimer2 library instead. I downloaded the lirary and replace with the servo.h. But then, I have a new error :
In file included from C:\Users\ambhika\Documents\Arduino\FabAcademy2\test\test.ino:1:0: C:\Users\ambhika\Documents\Arduino\libraries\ServoTimer2/ServoTimer2.h:76:17: error: conflicting declaration 'typedef uint8_t boolean' typedef uint8_t boolean; ^ In file included from sketch\test.ino.cpp:1:0: C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:117:14: note: previous declaration as 'typedef bool boolean' typedef bool boolean; ^ exit status 1 Error compiling for board Arduino/Genuino Uno.
Following this article, I comment out the typedef out of ServoTimer2.h (code line 76). Now in the test patch it does not give any errors.
Taken reference from this forum, seems like the methods are the same as one of Servo.h library. The only thing I need to change is from Servo object to ServoTimer2
The methods are: ServoTimer2 - Class for manipulating servo motors connected to Arduino pins. attach(pin ) - Attaches a servo motor to an i/o pin. attach(pin, min, max ) - Attaches to a pin setting min and max values in microseconds default min is 544, max is 2400 write() - Sets the servo pulse width in microseconds. read() - Gets the last written servo pulse width in microseconds. attached() - Returns true if there is a servo attached. detach() - Stops an attached servos from pulsing its i/o pin.
This time the program runs successfully without errors. I have to change the rotation parameter for servos which are different from the old library. Instead of rotation angle , now it is Pulse Width (milliseconds) with min : 544, max : 2400
Just to sum up : - I solved by replacing the library Servo with ServoTimer - Comment out the typedef out of ServoTimer2.h - Change rotation parameters of servos
Finally the parameters look good and the communication works fine !
input and output boards
From Rhino, I exported as dxf (2004 natural) and open it in Vcarve software. Set all layout, make fillet, add tabs. And cut !
Clean the wood, and then assemble.
Structure with the machine
Here is the video of the machine in action *during many test I have accidentally broken the tube joint. I have to invent a new one which doesn't fit perfectly.It leaks a little bit. That's why you see a tissue on the machine !
The art piece
The machine after action
Download files :
input + Rf transmitter program (ino) output + RF receiver program (ino) Base structure (dxf)