Hi guys,

Today I'll show how you can control a servo with Visual basic. Before this project I’ve never used Visual basic so if anyone finds any mistake in my code please leave a comment here and help me improve it.

you can visit my website for more electronic projects, interesting news and tips:

I've always used the Serial Monitor of the Arduino IDE to communicate with the Arduino, but today we will use a visual basic program that I've created. Basically in the VB program we have 4 buttons that will interact with the Arduino when we press them.

I’ll be showing program in Visual Basic that allows the user to rotate a servo attached to the Arduino. You need to make 3 connections from the servo to your arduino:

   Red: 3.3V (depends on your Servo motor)
   Brown: Ground
   Orange: Digital Pin 9

   Click here to download the VB code
   Click here to download the Arduino Sketch

   When you're using the Visual Basic Program the Serial monitor on the Arduino IDE must be closed
   You need to match the com port on your Visual Basic Code to the right com port you're Arduino is using

I don't know why but youtube cropped my video, the Last two buttons are "Rotate 180º Left" and "Rotate 180º right" . anyway watch it working :)

If you have any questions leave a comment!

About This Instructable


55 favorites


Bio: Author, Blogger, Electronics Enthusiast and Entrepreneur. For complete Electronics Projects and Tutorials go to: http://randomnerdtutorials.com/start-here
More by RuiSantos: ESP8266 Web Server (Without Arduino) Arduino Simple Memory Game Arduino – Datalogger with Temperature Sensor and Photoresistor
Add instructable to: