push button and bend sensor arduino to c-console

Hi guys

We are trying to build a combat simulator, and for that we need a bend sensor as well as a push button. We need to get read the data from the Arduino Diecemilla into a C-console as we need it for half-life source enging. BUT.....we are having trouble to find the code needed on both sides - the code for the arduino, as well as a class for reading the data on the other side. We tried searching the forums, but without any luck. Any help would be much appreciatet.

The Arduino can use the Serial class (begin, print, println, and write) to send data to the serial port.

On the PC, any number of languages can be used to write an application that reads serial data, and does whatever you need with it. C++ and C# on Windows make it trivially easy, but C, Perl, PHP, and other languages are not difficult to use.

Processing (http://Processing.org) is free software that uses Java. It includes a number of examples of how to send data to and receive data from the Arduino. At a minimum, they will show you what can be done. Then, write the same code in another language.

Thing is, we are really poor at programming, and really badly need a copy and paste code :P We basically need to receive the value from a digital push button as well as a bend senor, and print in a console window. (we are using visual c++). Anyone that could provide us with a working code would o fcourse receive credit in our report (it is for a bachelor project).

Thanx in advance

You will learn a lot more by doing the coding yourself. It really is not that difficult. As I said, the Processing application comes with several samples, with comments, that you can cut-and-paste together.

What kind of bachelor degree are you getting (science or arts)? What do you intend to do with the degree after you get it? Why this particular project if you can't do a little, simple programming?

I have yet to see any game engine that would allow you to control parts of it easily via serial; if it is possible, it is probably only something allowed if you purchase the full engine (lots of $$$ there).

Then again, I don't know what you are trying to do - what I have always looked for was a cheap virtual environment simulator that didn't take much programming (or at least could be done in a language I was more comfortable with).

The two possibilities I have found (besides various open-source game engines) have been Blender, as well as the open-source Second Life client. I basically want to take the output of my dual-sensor flock-of-birds (a 6DOF magnetic tracker), and use it to control a pointer (gun/hand position and orientation), as well as where I am looking (head orientation), so that I could route the graphics card output into one of my HMDs (I've got a nice Visette Pro just begging to be hacked), as well as build a glove interface to allow gesture recognition...

Sigh.

:)