I am trying to find a piece of hardware that will signal a program to start a timer when it is moving and stop when it stops. The hardware can just be a ball that moves and is connected to the computer through USB, I was thinking of something similar to the way a mouse would work. For the programing I would like to use c# or possibly ActionScript with adobe air. I am a web developer and have not had any experience with hardware or drivers and would appreciate any ideas on where to start. Maybe there is some piece of simple hardware out there that I can use to send signals to the computer or some literature of articles for beginners that you can point me to. Thanks in advance
It's difficult to suggest a solution without knowing exactly what it is you are trying to communicate with. There may be existing hardware that you can use, or you may need to create your own.
If there is an existing hardware that you can use, such as a mouse as a simple example, then all you need to do is communicate with the driver via it's API.
If you plan to make your own hardware, then depending on your budget, you may be able to create a custom device and create your own driver and API.
The easiest and most flexible option however, is to use an Arduino, or similar PIC product. An Arduino is a microcontroller, that can be used to interface with and control various sensors and input devices. You would create your custom sensors to detect the movement, and connect these to the arduino. You can then interface to the Arduino via a serial connection within a C# application on the PC.
See www.arduino.cc for more information and lots of tutorials on how to use an Arduino.
Arduino's are great for experimenting or one of projects, but may not be suitable for a commercial product.
You could also go for a Digital USB-Module that you can directly address hardware via USB.
For USB I/O that you can interface with .NET, check out Phidgets. For instance, there are accelerometer motion sensors that connect directly over USB. They have documentation about their .NET SDK on their site. I've used it with success.
You could also just use a mouse, right? :)
I also thought this project on kickstarter is similar to what you're describing, and wouldn't require any coding.
If you wanted to go wireless, consider buying a Wiimote and using the wiimotelib library written in C#. You'll need a bluetooth connection on the PC.
If you have an Android phone, you could access the accelerometer and use that for motion detection. You could use it in a tethered only mode... not sure how to interface it directly over the USB cable. Alternatively it could be wireless over a WiFi connection.