To control a HW cit. using a computer u should first have an interface, choose the suitable interface for your application : serial port, parallel port, USB , Ethernet.
And choose the one u can program and deal with, you may use programming language like C , Java or visual basic.