Communicating with Arduino from a Computer

Hi all, for starters, I have a strong programming background but am trying to learn a bit more about circuitry/microcontrollers, so this is my first experience with Arduino (I know very little so far).

I have a project where I want to basically have a laptop connected to an arduino board, and be able to communicate between the two. For example, I want the laptop to be able to send commands to the arduino board to do things like drive a servo. I'd also like to be able to get data back from the arduino board - for example, if I have a temperature sensor, I'd like the computer to be able to read it. Thus this isn't an entirely standalone arduino project.

My main questions - * Does anyone have any useful links or information on how this can be accomplished? Any similar projects people have blogged/written about, etc * How can I communicate between the two? Can I use the usb port, and is there a driver on the computer side that works on Windows that I can use to call into the arduino board, etc?

I'm fine with reading so would greatly appreciate any useful links. Thanks!

There are many choices in this area. My personal favorite is python. With the PySerial library its easy to talk to the arduino

This is my code for sending the time in a packed value to the arduino. It also waits for the arduino to ask for the time. This is a very simple example and you don't have to use python.

import serial, sys, os, time, struct, datetime

SERIALPORT = "COM2" # Change this to your serial port!
day = 0

def packIntegerAsULong(value):
        return struct.pack('I', value)

    ser = serial.Serial(SERIALPORT, 9600)
except serial.SerialException:
    print "no device connected - exiting"

while 1 == 1:
    now =
    day2 =
    if time.localtime().tm_isdst==0:
    if day2!=day:
        print time.ctime()
        day =
    if ser.inWaiting(): 
        outinit = eval(ser.readline())
        if outinit==1001:
            print time.ctime()

You can check : Processing. It can do both ways. Just program it. I did a few experiments with Processing and Arduino. Just basic - "hello word"

There is agood youtube tutorial series for the arduino made by jeremy part 6 it talks about serial can have a look, maybe it will help :)