Pages: [1]   Go Down
Author Topic: Lifebar, Getting health variables from PC game to arduino  (Read 803 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm planning on building a lifebar like the one bfayer did here exept i will start with just LEDs

I can't figure out how to get the information from the game to the arduino. Should i save the variables to a text file or is there any way to "stream" the variables between the PC and arduino.

The game I'm going to use it mostly for is Minecraft which is a game based on java if that helps

Thank you in advance
« Last Edit: July 04, 2013, 09:19:44 am by Criticalstone » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46091
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I can't figure out how to get the information from the game to the arduino.
If you don't have access to the source code, you can't. If you do, just send the data to the serial port that the Arduino is attached to.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do i do this? with a simple java or c++ code?
Please give me an example of the syntax that will send this data to the serial port.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46091
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Please give me an example of the syntax that will send this data to the serial port.
For Java? For C#? For PHP? For Python? For VB? For C++? Every language uses a different mechanism. The playground, in the "Interfacing with software" section has examples for every language.

Note that there is more to serial communication that just writing to the serial port. It needs to opened and closed properly, too.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't really understand what the examples on the playground mean.
 Java is a pretty familiar language so an example in Java would be nice
Thank you for taking your time with a noob coder ^^
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46091
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are examples on this page, along with full instructions:
http://playground.arduino.cc//Interfacing/Java
Logged

Pages: [1]   Go Up
Jump to: