Control Arduino With Visual Basic 6.0

by ujash patel in Circuits > Arduino

45763 Views, 44 Favorites, 0 Comments

Control Arduino With Visual Basic 6.0

ar.PNG

this instructable is part of my book Arduino + visual basic 6.0 (make your own software to control arduino Robot.

Visual basic 6.0 is a very old version some people may ask why we want to use visual basic 6.0 . visual basic 6.0 is a user friendly programming language ... so if you are beginner and want to lean basic pc based controlling system then visual basic 6.0 is a best option for you ....here we start :)

part to be required

1.Arduino board

2.bread board

3.jumper wires

4.leds


software's

1. visual basic 6.0

2. Arduino ide

Bread Board Circuits

Capture.PNG

Here we use Pin 9 as digital output pin connect Led With 9 Number pin of Arduino Board .As shown in breadboard circuit .

Arduino Program

int led= 9;

void setup() {

Serial.begin(9600);

pinMode(led, OUTPUT);

}

void loop() {

if (Serial.available())

{

int drukdata = Serial.read();

if (drukdata=='a')

{

digitalWrite(led,HIGH);

}

else if(drukdata=='b')

{

digitalWrite(led,LOW);

}}

}

Visual Basic 6.0 Program

Capture.PNG

make form shown in picture

Program for Visual basic 6 (Led on off Control Software)

Private Sub EXIT_Click()

Form1.Hide

End Sub

Private Sub Form_Load()

MSComm1.RThreshold = 3

MSComm1.Settings = "9600,n,8,1"

MSComm1.CommPort = 2 // (Write Port Number on which your Arduino Board is available).

MSComm1.PortOpen = True

MSComm1.DTREnable = False

Text1.Text = ""

Shape1.FillColor = vbRed

End Sub

Private Sub TURNOFF_Click()

MSComm1.Output = "b"

Text1.Text = "LED IS OFF"

Shape1.FillColor = vbRed

End Sub

Private Sub TURNON_Click()

MSComm1.Output = "a"

Text1.Text = "LED IS ON"

Shape1.FillColor = vbGreen

End Sub

For More Information Check This Book

servo motor control with vb and arduino
vb and arduino digital signal read

This book will help you

1. Control Leds with Arduino and Visual Basic 6.0.

2. Control Dc Motor With Arduino and Visual Basic 6.0.

3. Control Stepper Motor with Arduino and Visual Basic 6.0.

4. Control Servo Motor with Arduino and Visual Basic 6.0.

5. Make voice guidance program in Visual Basic 6.0

6. Interfacing RF Module with Arduino and Visual Basic 6.0.

7. Make simple Pc operated Wireless Arduino Robot.

also available in kindle store

http://www.amazon.com/Arduino-Visual-Basic-6-0-software/dp/1511667753

if you have any problem or need any help related to Arduino and any other project related to mechatronics robotics or in mechanical field. you can mail me or message me ...Thank you :)