I am trying to pick a board to buy -- he's a break down of what I am trying/doing :
On a video display, a series of letters / numbers are shown. Depending on what the video shows a different contact switch must be "pushed" (on an existing controller -- basically it's a atari joystick). So if "A" is shown, "UP" must be pressed. "B" push left, etc...
I currently have a piece of software that uses a webcam to watch the video display, and determines what should be pushed. All of the contacts on the input device are digital.
The "joystick" only has 6 digital inputs that it has to pick from. My question is would I be able to use this software (I have the source, and the knowledge to change/recompile) to send signals to the Arduino board to send a signal to the "controller" to make the connection (simulate that someone pressed up).
Or would I have to come up with some way to use a light sensor or something and write/send code to the board to handle it without the use of a PC connected to the board?
I hope this makes sense... while I can program in several languages, I'm very much a beginner when it comes to electronics. I don't have any problems reading/reasearching/learning -- just trying to make sure what I'm getting myself in to before I make the plunge.
Yeah - you could do it a number of ways, but the simplest would be to just send the communications down the USB serial link, then the Arduino would interpret them from there and perform whatever action you want (closing relays or activating a transistor/mosfet to simulate the "joystick" move).
Are there any resources for a completed project that were done using this method? I guess what I am still fuzzy on is, how will I pass commands to the board (I've never really done any USB/Serial work before) most of my programming is "self contained" (progam only, no hardware interfacing) and UI. The webcam was fairly easy because there was a lib that I hooked to that does all the hardware talking, I just have to look at the image and decide what to do.
However I'm a little cloudy on what these samples are. It appears that they are the "on board" code that is uploaded to the card... So I would need to make a basic "program" to upload to the card that said... If (x) recieved, activate contact (y).
However I'm unsure how to send the (x) to the card. I just downloaded the arduino-0018.zip file. Maybe some of my answers will be found in it.
If I understood you correctly, you are trying to communicate between a PC and Arduino. If this is the case, you might want to check out the Processing examples on the Tutorial page.
When communicating between an Arduino and a PC, one piece of code resides on your Arduino (uploaded), and you can code use Java/C++ on the PC to communicate with it using the serial link (on Linux it's /dev/ttyUSB0).
However I'm unsure how to send the (x) to the card. ...
Depending on what programming languages you are familiar, with you might look at Firmata
Run Firmata on the Arduino, and do all of the programming on the host.
If you are familiar with lower-level I/O you can probably figure out how to talk to the Arduino. You open a file which represents the device, and read or write bytes.
As I understand it, you only have 6 things the Arduino needs to do, so each byte will be a command.
Have a look at the Arduino Example SerialCallResponse.
(It has a lot of stuff towards the end which looks like a patch, ignore it)
Thanks for the replies. As I said, I downloaded the code editor, and I believe I have created the code I need to load to the card.
A co-worker suggested we test the voltage of the joystick to make sure it works in the range that the Arduino works in, so if that test goes well today, I'll order a card today.