SPRINT 1 BUILDING PHASE - P-Division-2018-2019/Team-12 GitHub Wiki
SLIDING FUNCTION plays a major role in the functioning of bot as it helps presser in changing the position to different keys where it has to press according to the tunes code embedded in the arduino.
SUBSYSTEM NAME : SLIDER AND PRESSER
FLOWCHART :
PROGRAM :
void setup()
{
Serial.begin(9600);
pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT
servo1.attach(9);
delay(10);
servo1.write(110); // put finger at starting position
servo3.attach(10);
delay(10);
servo3.write(71); // position slider at starting position
//delay(5000); // wait 5 seconds before beginning
}
void playKey(int slidePos)
{
servo3.write(slidePos); // move slider servo to key position
delay(300); // give slider time to get there
servo1.write(85); // move finger down and press key
delay(100); //give time to move finger down
servo1.write(110); //pick finger back up
delay(300); //give time to pick finger up before next slider move
}
SPRINT 1 IMAGE:
PRESSER-
SLIDER-
Functionality
The bot is designed to move linearly with the help of a servo motor . When the particular input is given , one out of the four tunes is played and before that the pressor is positioned to a predefined position to start playing the tune and the pressor is set to an particular angle of 65 degree . This angle provides the exact amount of force to it , with which it should press for maximum output. And hence forth the same process repeats for different inputs.
Testing
The motors are connected to 5V adaptor and 2A current and tested with various possibilities , such as connecting only one adaptor or drawing 5V from arduino or giving ground connection to arduino without using a bread board .