Loading...

Cara membuat Cotrol Servo Arduino dengan pemrograman Visual basic Gratis Source Code Siap Pakai

Motor Servo Control Arduino Menggunakan Visual Basic.NET

Saat ini kita akan membuat kendali Motor Servo Arduino menggunakan Visual Basic.NET,

Peralatan yang dibutuhkan :

  • Arduino Board
  • Visual Basic.NET
  • Motor Servo
  • Breadboard
  • Jumper Cable

Tampilan GUI yang dibuat menggunakan Visual Basic.NET

Cara membuat Cotrol Servo Arduino dengan pemrograman Visual basic Gratis Source Code Siap Pakai

Skematik Arduino dan Motor Servo :

Cara membuat Cotrol Servo Arduino dengan pemrograman Visual basic Gratis Source Code Siap Pakai

DOWNLOAD SOURCE CODE ARDUINO DISINI

Code Visual Basic.NET yang digunakan

Imports System.IO
Imports System.IO.Ports
Imports System.Threading

Public Class Form1

Shared _continue As Boolean
Shared _serialPort As SerialPort
Shared _val As DateInterval

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
SerialPort1.Close()
SerialPort1.PortName = “com3”
SerialPort1.BaudRate = 9600
SerialPort1.DataBits = 8
SerialPort1.Parity = Parity.None
SerialPort1.StopBits = StopBits.One
SerialPort1.Handshake = Handshake.None
SerialPort1.Encoding = System.Text.Encoding.Default
End Sub
Private Sub btn90L_Click_1(sender As System.Object, e As System.EventArgs) Handles btn90L.Click
SerialPort1.Open()
SerialPort1.Write(“0”)

SerialPort1.Close()
End Sub

Private Sub btn90R_Click(sender As System.Object, e As System.EventArgs) Handles btn90R.Click
SerialPort1.Open()
SerialPort1.Write(“1023”)
SerialPort1.Close()
End Sub

Private Sub btn180L_Click(sender As System.Object, e As System.EventArgs) Handles btn180L.Click
SerialPort1.Open()
SerialPort1.Write(“0”)
SerialPort1.Close()
End Sub

Private Sub btn180R_Click(sender As System.Object, e As System.EventArgs) Handles btn180R.Click
SerialPort1.Open()
SerialPort1.Write(“180”)
SerialPort1.Close()
End Sub

Private Sub Label1_Click(sender As System.Object, e As System.EventArgs) Handles Label1.Click

End Sub

End Class


0 Response to "Cara membuat Cotrol Servo Arduino dengan pemrograman Visual basic Gratis Source Code Siap Pakai "

Post a Comment