Hardware & Technical HOTAS: Razerduino (Razer Tartarus + Arduino)

Thrustmaster T.16000M FCS would have been my favorite. But.. not available until... *fuc#x@x#**!

--------------------------------

So I took my time, did some google search for "Arduino" and "Gamepad". Result: YES. Possible. That was 10 days ago.

The Idea: Build a thrust controller with an Arduino and put a Razer Tartarus keypad on top of it. A Razer / Arduino sandwich.

Lots of buttons and thrust control, all on the left hand. Probably better then any commercial HOTAS.

This is the final Razerduino:

img_0954800ags5k.jpg


Thrust control via linear fader and a couple of extra buttons.

How did it start?

Here is the first prototype:

img_09448005gbz7.jpg


Some wood and 2 linear guides as used in drawers + Arduino Micro (USB capable 32U4 controller) and a 60mm fader. Arduino acting as a gamecontroller. Fader goes to X-axis of gamepad... Simple.

Put the Razer Tartarus on top - and we have a keypad/gamepad sandwich. Actually a HOTAS:

img_0952800d1sr8.jpg


In the final version the Arduino got some extra buttons and a LED (green for zero throttle, blink for reverse).

What to say.. I have no need for Thrustmaster, Saitek, CH.Products... anymore.
My First Class Passengers like the smooth ride. As well, as I do [up]

Code:
//NicoHood/HID (on github) and Arduino Version 1.6.8 (1.6.10, 1.6.12 dont work!)
#include <HID-Project.h>
#include <HID-Settings.h>

void setup()
{
pinMode(2, INPUT_PULLUP);
pinMode(3, INPUT_PULLUP);
pinMode(4, INPUT_PULLUP);
pinMode(5, OUTPUT);
pinMode(6, INPUT_PULLUP);
pinMode(7, INPUT_PULLUP);
pinMode(8, INPUT_PULLUP);
pinMode(9, INPUT_PULLUP);
pinMode(10, INPUT_PULLUP);
pinMode(11, INPUT_PULLUP);
pinMode(12, INPUT_PULLUP);
pinMode(13, INPUT_PULLUP);
pinMode(A0, INPUT_PULLUP);
pinMode(A1, INPUT_PULLUP);
pinMode(A2, INPUT_PULLUP);
pinMode(A3, INPUT_PULLUP);
pinMode(A4, INPUT_PULLUP);
//Serial.begin(9600);
// put your setup code here, to run once:
Gamepad.begin();
}

int ct=0;
void loop()
{ // put your main code here, to run repeatedly:
//int button1=digitalRead(2);
if (ct<500) ct++;
else ct=0;

if (!digitalRead(2)) Gamepad.press(1);
else Gamepad.release(1);
if (!digitalRead(3)) Gamepad.press(2);
else Gamepad.release(2);
if (!digitalRead(4)) Gamepad.press(3);
else Gamepad.release(3);
if (!digitalRead(6)) Gamepad.press(4);
else Gamepad.release(4);
if (!digitalRead(7)) Gamepad.press(5);
else Gamepad.release(5);
if (!digitalRead(8)) Gamepad.press(6);
else Gamepad.release(6);
if (!digitalRead(9)) Gamepad.press(7);
else Gamepad.release(7);
if (!digitalRead(10)) Gamepad.press(8);
else Gamepad.release(8);
if (!digitalRead(11)) Gamepad.press(9); //sw1
else Gamepad.release(9);
// if (!digitalRead(12)) Gamepad.press(10); //sw2 main
// else Gamepad.release(10);
if (!digitalRead(13)) Gamepad.press(16);
else Gamepad.release(16);
if (!digitalRead(A4)) Gamepad.press(11);
else Gamepad.release(11);
if (!digitalRead(A3)) Gamepad.press(12);
else Gamepad.release(12);
if (!digitalRead(A2)) Gamepad.press(13);
else Gamepad.release(13);
if (!digitalRead(A1)) Gamepad.press(14);
else Gamepad.release(14);
if (!digitalRead(A0)) Gamepad.press(15);
else Gamepad.release(15);

unsigned int val=analogRead(A5);
//Serial.print(val);

Gamepad.xAxis(val*64-32768);
//analogWrite(5, 255-val/4); // analogRead values go from 0 to 1023, analogWrite values from 0 to 255

if (!digitalRead(11)) //sw1 - reverse switch
{
if (ct<100) digitalWrite(5, LOW); //blink
else digitalWrite(5, HIGH);
}
else //fwd
{
if (val==0) digitalWrite(5, LOW);
else digitalWrite(5, HIGH);
}
// Functions above only set the values.
// This writes the report to the host.
if (!digitalRead(12)) Gamepad.write(); //disable with SW2 for reboot
else digitalWrite(5, HIGH);
}

Build your own. It's Open Source. :)

Greetings from Germany, CMDR Tarli.
 
Back
Top Bottom