Professional Documents
Culture Documents
Exp 4 Robotics
Exp 4 Robotics
Experiment # 4
Group # 6
ECE51
Instructor
I. DATA
Arduino
}
void setup()
Serial.begin(9800);
void loop()
{
Visual Studio
End Sub
If TextBox2.InvokeRequired Then
Dim x As New SetTextCallback(AddressOf readtext)
Invoke(x, New Object() {(text)})
Else
TextBox2.Text &= "Group 1: " & [text] & vbNewLine
End If
End Sub
Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles
TextBox2.TextChanged, TextBox2.EnabledChanged
End Sub
End Class
II. OUTPUT
III. Analysis
In this experiment , we are about to learn to how to control the servo motor using the
approximately 270 degrees. The first part in the code is setting up the potentiometer
which is analog read and it’s designated pins. The second part is setting up the servo
motor and it’s pins. In the visual studio, the first part is setting up the serial port for the
potentiometer. The second part is setting up for the serial monitor like in the arduino.
IV. Conclusion
Based on the experiment, the researchers learn how to control the servo motor using the
As you rotate the potentiometer, the servo motor also rotates. In the visual studio it shows
the received message that is coming from the arduino which is like counter part of the
serial monitor.