Ship Simulator Extremes

Ship Simulator Extremes

Joystick based Custom controller - Solved
Hi, i made custom controller out of Arduino Leonardo featuring controlls for 2 engine, 2 rudder and 2 thrusters using pot-s. And it works :)
Inspired by this:
http://80.95.161.114/shipsim/forum/index.php?topic=4503.0

Main Arduino Leonardo work has done by:
http://www.imaginaryindustries.com/blog/?p=80

I added my own touch, using only 6 axis for my controller.

**Solved**
Because POV switch decided to be ON in default setting i had to give it value to stay OFF( i have USB HID template with 8axis, 2 POV, 32 buttons :), or it had messed up my control config on Ship Sim )
*****
I'm running Ship Sim in Win8 machine but game doesent recognize input. In Win8 input from controller works fine, but in game when adding controlls, it will input "Joy1_POV 1_0" as secondary or primary input for every channel (using xAxis, Throttle etc) plus warning "Selected key is already in use: Show/Hide panels" . I have some Directx tool that also displays correct input from my controller, but nothing goes through into the game.

Tested Ship Simulator on win 7 machine also but same problem still.
Also noticed that in Control/Interface menu there is line
"941 LanguageID not found!"

Is anyone using Joystick as a controller or wheel or throttle, do you managed to set up the controller ?
*****
Legutóbb szerkesztette: luurmets; 2014. febr. 22., 2:14
< >
14/4 megjegyzés mutatása
Hello.

I have the same problem as you on ship simulator '08. I am using an arduino set up as a joystick controller. And real kobelt 6555 ship throttle/pitch levers. It is working just fine when calibrating in "Game Controllers". The x-/z-axis looks smooth in test mode. But when i config in ship sim i get the same message as you; "Joy1 POV 10". I see that you have written the solution on your problem over here. But i dont quite understand what it means that the "POV switch was on in default setting"?
I did some programming in Arduino and one channel input was always on by default, messing with config. if i remmember correctly i had to programm it off. PS haven´t had any time to play it 4 years now due to moving and other stuff. Self made controller sits in bubblewrap for now.
thanks for the answer.

Still dealing with the same problem... I have no clue what makes the control goes in to "Joy1_POV 1_0" when my control is plugged in. No matter what keys I press on my computers tastature, I get this "Joy1_POV 1_0". When I doubleclick on the select control function in shipsim, it goes straight into "Joy1_POV 1_0"



The only code I am using is as follows;
------------------------------------------------------------------------------------------------------------------
void setup() {
pinMode(10, INPUT_PULLUP);
pinMode(11, INPUT_PULLUP);
}

void loop() {

Joystick.X(analogRead(10));
Joystick.Y(analogRead(11));



delay(50);
}
-----------------------------------------------------------------------------------------------------------------

As you see, I am only using analogs, therefor I have no clue, I would have guessed that POV was a digital, and not a analog read.

would appreciate it ALOT if you could help me with this, it's made me stay up to late nights.

If possible, and if you got time to help me, could you contact me on mail on this adress

gaugstadstian @ gmail.com
https://github.com/AlanChatham/UnoJoy/tree/master/LeoJoy/hardware/leojoy
this is the link i used to make my controller with Arduino Leonardo

My modified code for arduino

/*
Arduino Leonardo Joystick!


const int xAxis = A0; // joystick X axis
const int yAxis = A1;
const int zAxis = A2; // joystick X axis
const int xrotAxis = A3;
const int yrotAxis = A4; // joystick X axis
const int wheelAxis = A5;
const int xAxis = A0; // joystick X axis
*/

JoyState_t joySt;

void setup()
{
pinMode(13, OUTPUT);


//joySt.xAxis = 0;
//joySt.yAxis = 0;
//joySt.zAxis = 0;
//joySt.xRotAxis = 0;
//joySt.yRotAxis = 0;
//joySt.zRotAxis = 0;
//joySt.throttle = 0;
//joySt.rudder = 0;
joySt.hatSw1 = 8; //pole valitud asend?
joySt.hatSw2 = 8; //pole valitud asend?
//joySt.buttons = 0;

}


void loop()
{

joySt.xAxis = readAxis(A0);
joySt.yAxis = readAxis(A1);
joySt.zAxis = readAxis(A2);
joySt.xRotAxis = readAxis(A3);
joySt.yRotAxis = readAxis(A4);
//joySt.zRotAxis = readAxis(A5); // ei tqqta
//joySt.throttle = random(255);
joySt.rudder = readAxis(A5);


// Call Joystick.move
Joystick.setState(&joySt);

}

int readAxis(int thisAxis) {
// read the analog input:
int reading = analogRead(thisAxis);

// map the reading from the analog input range to the output range:
reading = map(reading, 0, 1023, 0, 255);
return reading;
}
*************************

joySt.xAxis = readAxis(A0);
joySt.yAxis = readAxis(A1);
joySt.zAxis = readAxis(A2);
joySt.xRotAxis = readAxis(A3);
joySt.yRotAxis = readAxis(A4);
joySt.rudder = readAxis(A5);
these are 6 inputs that i used (2 rudder, 2 throttle, 2 thruster)
< >
14/4 megjegyzés mutatása
Laponként: 1530 50

Közzétéve: 2014. febr. 18., 13:50
Hozzászólások: 4