Using Visual Basic for controlling servo motor through arduino

Hi,

I am newbie. I have working arduino code for my servo motor only i need is some basic help to control existing arduino sketch from a visual basic form application? please guide me to basic examples. also what changes i should make to my existing sketch ?

int sensorPin = A3;
int sensorValue = 0;

void setup() {
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  digitalWrite(8,LOW);
  digitalWrite(9,LOW);// put your setup code here, to run once:
}

void loop() {
  sensorValue = analogRead(sensorPin);
  sensorValue = map(sensorValue,0,1023,3600,1);
  digitalWrite(9,HIGH);
  delayMicroseconds(sensorValue);
  digitalWrite(9,LOW);
  delayMicroseconds(sensorValue);
  // put your main code here, to run repeatedly:
}

thank you

For a basic intro to VB have a look at:

Arduino and Visual Basic Part 1: Receiving Data From the Arduino
Arduino and Visual Basic Part 2: Receiving Data From the Arduino
Arduino and Visual Basic Part 3: Controlling an Arduino

The examples in Serial Input Basics may also be of interest.

…R