PDA

View Full Version : Modular DIY Buttonbox - INPUTS : V1b, 20/30 Buttons and 10/8 Rotary functions



Killg0re NL
15-03-2018, 21:39
The buttonbox should work on PC, PS4 and XBOX1? as it justs emulates a keyboard.

Special thanks to Markus Dörner, for the initial sketch.

Check check THIS LINK (http://forum.projectcarsgame.com/showthread.php?65159-Modular-DIY-Buttonbox-Outputs-V1b&p=1544432#post1544432) for reflecting ingame data.


Step 1: Actual
Arduino Leonardo Buttonbox V1a.
With Button 16, you can select the alternative Encoder function's

Prototype, with not even all buttons wired out, labels differ from actual situation. But you get the point
251911

USB

8 Rotary encoders functions. (Alternative Encoder function selection on Button 16)
15 Assignable buttons.
4 Hard coded leds (Lights, TCS, ABS, ESP)
1 Led for indicating the Encoder function


Step 2: Realised. (27 april 2018.)
USB
'8' Rotary encoders. through 4 hardwired Encoders.
15 Free assignable buttons.

WIFI
4 Leds outputs adressed from game (Lights, TCS, ABS, ESP)
1 Led for indicating the Encoder function
For now these go through a wifi module, on a separate Arduino

Step 3: Future
USB
'8' Rotary encoders. through 4 hardwired Encoders.
16 Assignable buttons. (or more)

WIFI
4 Leds outputs adressed from game (Lights, TCS, ABS, ESP) (Working)
1 led for indicating the Encoder function (Working)
Gear indicator (Working in Serial)
Speed indicator
RPM indicator

Future layout (step 3, and subject to change)
251957]

Arduino Leonardo, Version 1b
Hardware pinout



Row Pins: 2, 3, 4, 5
Col Pins: A0, A1, A2, A3
Led outputs: A4, (Rotary Function)
Encoder 1 on pins: 7, 6
Encoder 2 on pins: 9, 8
Encoder 3 on pins: 11, 10
Encoder 4 on pins: 13, 12



Buttonbox V1b sketch / code


/*ARDUINO ButtonBox (expand for HEX code's)
//ARDUINO ButtonBox -> Example: MAP THE KEYBOARD-BUTTON "5" FOR INGAME-FUNCTION "WIPER ON/OFF" ETC.
//Created by: Markus Dörner, 2015, with help from the Arduino Community.
//Altered by Killg0re NL Version 1b, 5 july 2018.
* -------------------------------------------------------------------------
* Arduino HEX key codes
* -------------------------------------------------------------------------
0 = 0x30 f = 0x66 u = 0x75 ~ = 0x7E BACKSPACE = 0xB2
1 = 0x31 g = 0x67 v = 0x76 # = 0xE0 DELETE = 0xD4
2 = 0x32 h = 0x68 w = 0x77 F1 = 0xC2 ESC = 0xB1
3 = 0x33 i = 0x69 x = 0x78 F2 = 0xC3 HOME = 0xD2
4 = 0x34 j = 0x6A y = 0x79 F3 = 0xC4 INSERT = 0xD1
5 = 0x35 k = 0x6B z = 0x7A F4 = 0xC5 RETURN = 0xB0
6 = 0x36 l = 0x6C ' = 0x27 F5 = 0xC6 SPACE = 0x20
7 = 0x37 m = 0x6D , = 0x2C F6 = 0xC7 TAB = 0xB3
8 = 0x38 n = 0x6E - = 0x2D F7 = 0xC8 LEFT_ARROW = 0xD8
9 = 0x39 o = 0x6F . = 0x2E F8 = 0xC9 RIGHT_ARROW = 0xD7
a = 0x61 p = 0x70 / = 0x2F F9 = 0xCA UP_ARROW = 0xDA
b = 0x62 q = 0x71 ; = 0x3B F10 = 0xCB DOWN_ARROW = 0xD9
c = 0x63 r = 0x72 = = 0x3D F11 = 0xCC Print Screen = 0xCE
d = 0x64 s = 0x73 [ = 0x5B F12 = 0xCD
e = 0x65 t = 0x74 ] = 0x5D
* -------------------------------------------------------------------------


ANALOG IN/OUTPUT:
A0 - i - Keypad Column 1
A1 - i - Keypad Column 2
A2 - i - Keypad Column 3
A3 - i - Keypad Column 4
A4 - o - Led Encoder Function
A5 - o - Led Headlight (currently not in this sketch / Leonardo)
A6 (DUE)- o - Led ABS
A7 (DUE)- o - Led ESP
A8 (DUE)- o - Led TCS
A9 (DUE)- o - Led Fuel
A10(DUE)- i/o -
A11(DUE)- i/o -

DIGITAL IN/OUTPUT
0 (RX) - i - Reserved for serial(0) interface
1 (TX) - i - Reserved for serial(0) interface
2 - i - Keypad Row 1
3 - i - Keypad Row 2
4 - i - Keypad Row 3
5 - i - Keypad Row 4
6 - i - Encoder 1a
7 - i - Encoder 1b
8 - i - Encoder 2a
9 - i - Encoder 2b
10 - i - Encoder 3a
11 - i - Encoder 3b
12 - i - Encoder 4a
13 - i - Encoder 4b
14(DUE) - i/o - Reserved for serial(3)
15(DUE) - i/o - Reserved for serial(3)
16(DUE) - i/o - Reserved for serial(2)
17(DUE) - i/o - Reserved for serial(2)
18(DUE) - i/o - Reserved for serial(1)
19(DUE) - i/o - Reserved for serial(1)
20(DUE) - i/o - Reserved for SDA
21(DUE) - i/o - Reserved for SCL
22(DUE) - i/o -
23(DUE) - i/o -
24(DUE) - i/o -
25(DUE) - i/o -
26(DUE) - i/o -
27(DUE) - i/o -
28(DUE) - i/o -
29(DUE) - i/o -
30(DUE) - i/o -
and 31 to 53
*/

#include <Keypad.h>
#include <Keyboard.h> // Remove/Place '//' to in-/ex-clude keyboard.h

char sketchName[]= "Buttonbox_V1b"; // SketchName
char sketchDate[]= "5 july 2018"; // SketchDate

const byte ROWS = 4; // Four rows, 16 Buttons
const byte COLS = 4; // Four columns

// Define the Keymap
char hexaKeys[ROWS][COLS] = {
{'1','2','3','4'}, //Button connnected to PIN 2
{'5','6','7','8'}, //Button connnected to PIN 3
{'9','0','A','B'}, //Button connnected to PIN 4
{'C','D','E','F'}, //Button connnected to PIN 5
//PIN: A0 A1 A2 A3
};
// Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
byte rowPins[ROWS] = { 2, 3, 4, 5};
// Connect keypad COL0, COL1 and COL2 to these Arduino pins.
byte colPins[COLS] = { A0, A1, A2, A3};

// Create the Keypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS );


// Controllable LED's
#define ledpinRBTN A4 // EncoderFunction
boolean ledpinRBTN_state;
//#define ledpinLight A5 // Headlight
//boolean ledpinLight_state;

int buttonState = LOW;

boolean blink = false;

//For calculating how many times: loop/sec (Loopcount)
unsigned long loopCount;
unsigned long startTime;
String msg;

//Encoders
unsigned long currentTime1;
unsigned long loopTime1;
unsigned long currentTime2;
unsigned long loopTime2;
unsigned long currentTime3;
unsigned long loopTime3;
unsigned long currentTime4;
unsigned long loopTime4;

//Encoder 1
const int pin_ENC_1A = 6; // pin 7
const int pin_ENC_1B = 7; // pin 6
unsigned char encoder_ENC_1A;
unsigned char encoder_ENC_1B;
unsigned char encoder_ENC_1A_prev=0;

//Encoder 2
const int pin_ENC_2A = 8; // pin 9
const int pin_ENC_2B = 9; // pin 8
unsigned char encoder_ENC_2A;
unsigned char encoder_ENC_2B;
unsigned char encoder_ENC_2A_prev=0;

//Encoder 3
const int pin_ENC_3A = 10; // pin 11
const int pin_ENC_3B = 11; // pin 10
unsigned char encoder_ENC_3A;
unsigned char encoder_ENC_3B;
unsigned char encoder_ENC_3A_prev=0;

//Encoder 4
const int pin_ENC_4A = 12; // pin 13
const int pin_ENC_4B = 13; // pin 12
unsigned char encoder_ENC_4A;
unsigned char encoder_ENC_4B;
unsigned char encoder_ENC_4A_prev=0;

void setup(){
//Encoders

// Encoder 1
currentTime1 = micros();
loopTime1 = currentTime1;
pinMode(pin_ENC_1A, INPUT_PULLUP);
pinMode(pin_ENC_1B, INPUT_PULLUP);

// Encoder 2
currentTime2 = micros();
loopTime2 = currentTime2;
pinMode(pin_ENC_2A, INPUT_PULLUP);
pinMode(pin_ENC_2B, INPUT_PULLUP);

// Encoder 3
currentTime3 = micros();
loopTime3 = currentTime3;
pinMode(pin_ENC_3A, INPUT_PULLUP);
pinMode(pin_ENC_3B, INPUT_PULLUP);

// Encoder 4
currentTime4 = micros();
loopTime4 = currentTime4;
pinMode(pin_ENC_4A, INPUT_PULLUP);
pinMode(pin_ENC_4B, INPUT_PULLUP);
//End Encoders

pinMode(ledpinRBTN,OUTPUT);
// pinMode(ledpinLight,OUTPUT);

loopCount = 0;
startTime = millis();
msg = "";
ledpinRBTN_state = digitalRead(ledpinRBTN);
// ledpinLight_state = digitalRead(ledpinLight);

customKeypad.addEventListener(keypadEvent);
customKeypad.setHoldTime(250);
customKeypad.setDebounceTime(100); // Default is 50mS

// while (!Serial) ; // For Arduino Due
Serial.begin(9600);
Serial.println();
Serial.println("************************************************************");
Serial.print("Sketchname: "); Serial.println(sketchName);
Serial.print("Sketchdate: "); Serial.println(sketchDate);
Serial.println("************************************************************");
}
void loop(){

//Encoders
if (buttonState != LOW ){
//Encoder 1 // Brake Bias
currentTime1 = micros(); // get the current elapsed time
if(currentTime1 >= (loopTime1 + 50)){ // 50uS since last check of encoder
encoder_ENC_1A = digitalRead(pin_ENC_1A); // Read encoder pins
encoder_ENC_1B = digitalRead(pin_ENC_1B);
if((!encoder_ENC_1A) && (encoder_ENC_1A_prev)){ // A has gone from high to low
if(encoder_ENC_1B) { // B is high so clockwise
Serial.println("CW-1A ");
Keyboard.press(0x73); // Key 'S'
delay(50);
Keyboard.release(0x73);
}
else { // B is low so counter-clockwise
Serial.println("CCW-1A ");
Keyboard.press(0x74); // Key 'T'
delay(50);
Keyboard.release(0x74);
}
}
encoder_ENC_1A_prev = encoder_ENC_1A; // Store value of A for next time
loopTime1 = currentTime1; // Updates loopTime
}

//Encoder 2 // Anti Roll bar Front
currentTime2 = micros(); // get the current elapsed time
if(currentTime2 >= (loopTime2 + 50)){ // 50uS since last check of encoder
encoder_ENC_2A = digitalRead(pin_ENC_2A); // Read encoder pins
encoder_ENC_2B = digitalRead(pin_ENC_2B);
if((!encoder_ENC_2A) && (encoder_ENC_2A_prev)){ // A has gone from high to low
if(encoder_ENC_2B) { // B is high so clockwise
Serial.println("CW-2A ");
Keyboard.press(0x75); // Key 'U'
delay(50);
Keyboard.release(0x75);
}
else { // B is low so counter-clockwise
Serial.println("CCW-2A ");
Keyboard.press(0x76); // Key 'V'
delay(50);
Keyboard.release(0x76);
}
}
encoder_ENC_2A_prev = encoder_ENC_2A; // Store value of A for next time
loopTime2 = currentTime2; // Updates loopTime
}

//Encoder 3 // Anti Roll bar Rear
currentTime3 = micros(); // get the current elapsed time
if(currentTime3 >= (loopTime3 + 50)){ // 50uS since last check of encoder
encoder_ENC_3A = digitalRead(pin_ENC_3A); // Read encoder pins
encoder_ENC_3B = digitalRead(pin_ENC_3B);
if((!encoder_ENC_3A) && (encoder_ENC_3A_prev)){ // A has gone from high to low
if(encoder_ENC_3B) { // B is high so clockwise
Serial.println("CW-3A ");
Keyboard.press(0x77); // Key 'W'
delay(50);
Keyboard.release(0x77);
}
else { // B is low so counter-clockwise
Serial.println("CCW-3A ");
Keyboard.press(0x78); // Key 'X'
delay(50);
Keyboard.release(0x78);
}
}
encoder_ENC_3A_prev = encoder_ENC_3A; // Store value of A for next time
loopTime3 = currentTime3; // Updates loopTime
}

//Encoder 4 // ???
currentTime4 = micros(); // get the current elapsed time
if(currentTime4 >= (loopTime4 + 50)){ // 50uS since last check of encoder
encoder_ENC_4A = digitalRead(pin_ENC_4A); // Read encoder pins
encoder_ENC_4B = digitalRead(pin_ENC_4B);
if((!encoder_ENC_4A) && (encoder_ENC_4A_prev)){ // A has gone from high to low
if(encoder_ENC_4B) { // B is high so clockwise
Serial.println("CW-4A ");
Keyboard.press(0x79); // Key 'Y'
delay(50);
Keyboard.release(0x79);
}
else { // B is low so counter-clockwise
Serial.println("CCW-4A ");
Keyboard.press(0x7A); // Key 'Z'
delay(50);
Keyboard.release(0x7A);
}
}
encoder_ENC_4A_prev = encoder_ENC_4A; // Store value of A for next time
loopTime4 = currentTime4; // Updates loopTime
}


// Encoder Function Switch is on "B"
} else {
//Encoder 1 // ???
currentTime1 = micros(); // get the current elapsed time
if(currentTime1 >= (loopTime1 + 50)){ // 50uS since last check of encoder
encoder_ENC_1A = digitalRead(pin_ENC_1A); // Read encoder pins
encoder_ENC_1B = digitalRead(pin_ENC_1B);
if((!encoder_ENC_1A) && (encoder_ENC_1A_prev)){ // A has gone from high to low
if(encoder_ENC_1B) { // B is high so clockwise
Serial.println("CW-1B ");
Keyboard.press(0x6C); // Key 'N'
delay(50);
Keyboard.release(0x6C);
}
else { // B is low so counter-clockwise
Serial.println("CCW-1B ");
Keyboard.press(0x6B); // Key 'M'
delay(50);
Keyboard.release(0x6B);
}
}
encoder_ENC_1A_prev = encoder_ENC_1A; // Store value of A for next time
loopTime1 = currentTime1; // Updates loopTime
}

//Encoder 2 // Seat Position
currentTime2 = micros(); // get the current elapsed time
if(currentTime2 >= (loopTime2 + 50)){ // 50uS since last check of encoder
encoder_ENC_2A = digitalRead(pin_ENC_2A); // Read encoder pins
encoder_ENC_2B = digitalRead(pin_ENC_2B);
if((!encoder_ENC_2A) && (encoder_ENC_2A_prev)){ // A has gone from high to low
if(encoder_ENC_2B) { // B is high so clockwise
Serial.println("CW-2B ");
Keyboard.press(0x6E); // Key 'P' Seat Forward
delay(50);
Keyboard.release(0x6E);
}
else { // B is low so counter-clockwise
Serial.println("CCW-2B ");
Keyboard.press(0x6D); // Key 'O' Seat Backward
delay(50);
Keyboard.release(0x6D);
}
}
encoder_ENC_2A_prev = encoder_ENC_2A; // Store value of A for next time
loopTime2 = currentTime2; // Updates loopTime
}

//Encoder 3 // Seat UP/DOWN
currentTime3 = micros(); // get the current elapsed time
if(currentTime3 >= (loopTime3 + 50)){ // 50uS since last check of encoder
encoder_ENC_3A = digitalRead(pin_ENC_3A); // Read encoder pins
encoder_ENC_3B = digitalRead(pin_ENC_3B);
if((!encoder_ENC_3A) && (encoder_ENC_3A_prev)){ // A has gone from high to low
if(encoder_ENC_3B) { // B is high so clockwise
Serial.println("CW-3B ");
Keyboard.press(0x70); // Key 'R' Seat UP
delay(50);
Keyboard.release(0x70);
}
else { // B is low so counter-clockwise
Serial.println("CCW-3B ");
Keyboard.press(0x6F); // Key 'Q' Seat DOWN
delay(50);
Keyboard.release(0x6F);
}
}
encoder_ENC_3A_prev = encoder_ENC_3A; // Store value of A for next time
loopTime3 = currentTime3; // Updates loopTime
}

//Encoder 4 // Seat Angle
currentTime4 = micros(); // get the current elapsed time
if(currentTime4 >= (loopTime4 + 50)){ // 50uS since last check of encoder
encoder_ENC_4A = digitalRead(pin_ENC_4A); // Read encoder pins
encoder_ENC_4B = digitalRead(pin_ENC_4B);
if((!encoder_ENC_4A) && (encoder_ENC_4A_prev)){ // A has gone from high to low
if(encoder_ENC_4B) { // B is high so clockwise
Serial.println("CW-4B ");
Keyboard.press(0x72); // Key 'Y' Angle UP
delay(50);
Keyboard.release(0x72);
}
else { // B is low so counter-clockwise
Serial.println("CCW-4B ");
Keyboard.press(0x71); // Key 'Z' Angle DOWN
delay(50);
Keyboard.release(0x71);
}
}
encoder_ENC_4A_prev = encoder_ENC_4A; // Store value of A for next time
loopTime4 = currentTime4; // Updates loopTime
}
}
//End Encoders

if (buttonState != HIGH) {
digitalWrite(ledpinRBTN, HIGH); // turn LED on
} else {
digitalWrite(ledpinRBTN, LOW); // turn LED off
}

loopCount++;
if ( (millis()-startTime)>5000 )
{
Serial.print("Average loops per second = ");
Serial.println(loopCount/5);
Serial.print("Encoder Function = ");
Serial.println(buttonState);
startTime = millis();
loopCount = 0;
}

// Fills customKeypad.key[ ] array with up-to 10 active keys.
// Returns true if there are ANY active keys.
if (customKeypad.getKeys())
{
for (int i=0; i<LIST_MAX; i++) // Scan the whole key list.
{
if ( customKeypad.key[i].stateChanged ) // Only find keys that have changed state.
{
switch (customKeypad.key[i].kstate) { // Report active key state : IDLE, PRESSED, HOLD, or RELEASED
case PRESSED:
msg = " PRESSED.";
break;
case HOLD:
msg = " HOLD.";
break;
case RELEASED:
msg = " RELEASED.";
break;
case IDLE:
msg = " IDLE.";
}
Serial.print("Key ");
Serial.print(customKeypad.key[i].kchar);
Serial.println(msg);
}
}
}
if (blink){ // Headlights -> Flash 8 Times
for (int x = 0; x < 8; x++) {
Keyboard.press(0x37); // Press '7'
delay(150);
Keyboard.release(0x37);
delay(150);
}
blink = false;
}
}

void keypadEvent(KeypadEvent key){
switch (customKeypad.getState()){
case PRESSED:
if (key == '1') { //
Keyboard.press(0x31); // Press '1'
delay(100);
Keyboard.release(0x31); // Release '1'
}
if (key == '2') { //
Keyboard.press(0x32); // Press '2'
delay(100);
Keyboard.release(0x32); // Release '2'
}
if (key == '3') { //
Keyboard.press(0x33); // Press '3'
delay(100);
Keyboard.release(0x33); // Release '3'
}
if (key == '4') { //
Keyboard.press(0x34); // Press '4'
delay(100);
Keyboard.release(0x34); // Release '4'
}
if (key == '5') { //
Keyboard.press(0x35); // Press '5'
delay(100);
Keyboard.release(0x35); // Release '5'
}
if (key == '6') { //
Keyboard.press(0x36); // Press '6'
delay(100);
Keyboard.release(0x36); // Release '6'
}
if (key == '7') { // Headlights On/Off (cant use toggle switch)
Keyboard.press(0x37); // Press '7'
delay(100);
Keyboard.release(0x37); // Press '7'
}
if (key == '8') { // Headlight Flash -> Flash the Head light x times (cant use toggle switch)
blink = true;
}
if (key == '9') { //
Keyboard.press(0x39); // Press '9'
delay(100);
Keyboard.release(0x39); // Release '9'
}
if (key == '0') { //
Keyboard.press(0x30); // Press '0'
delay(100);
Keyboard.release(0x30); // Release '0'
}
if (key == 'A') { //
Keyboard.press(0x61); // Press 'A'
delay(100);
Keyboard.release(0x61); // Release 'A'
}
if (key == 'B') { //
Keyboard.press(0x62); // Press 'B'
delay(100);
Keyboard.release(0x62); // Release 'B'
}
if (key == 'C') { //
Keyboard.press(0x63); // Press 'C'
delay(100);
Keyboard.release(0x63); // Release 'C'
}
if (key == 'D') { //
Keyboard.press(0x64); // Press 'D'
delay(100);
Keyboard.release(0x64); // Release 'D'
}
if (key == 'E') { //
Keyboard.press(0x65); // Press 'E'
delay(100);
Keyboard.release(0x65); // Release 'E'
}
if (key == 'F') { // Encoder Function Selection
buttonState = !buttonState;
delay(100); // Debounce
}
break;

case HOLD:
// Code
break;

case RELEASED:
//Code
break;
}
}


Forum post Changelog:
5 july 2018 - Post / Code updated to V1b


Sketch Changelog:
Deleted where the keys are for.
it is an buttonbox, it generated key strokes. When you connect the the switch and assign that key ingame it works nomatter the label in the sketch. So less confusion.
Deleted the ' funny led test as the arn't mucht leds left to test.
Updated the Info part, with ie. the Leonardo / Due pinout.
On startup, it prints on the serial line what version sketch it is.
When turning an encoder, it shows on the Serial line, CW or CCW or the alternative CW / CCW.
ATTENTION: Changed row / column pins

Killg0re NL
18-04-2018, 19:05
V1 program is updated to V1a.
- Encoder inputs are no longer floating when not connected.
- Used one button (16) to have 4 extra alternative Encoder functions.
So there's no need for another 4 hardware encoder, but there are 8 encoder functions available.
- Assigned one Led, for visualisation off the encoder function. (LED = Off is original function, LED = On, is alternative Encoder function)
- Added text / explanation

Killg0re NL
18-04-2018, 19:09
V2 is also on the way.
This version is a different hardware version.
It uses two MCP chips, saving the pins on the Leonardo for the Wifi module, Speed, Gear and RPM functions.
Now there are 8 led's adressable, and 8 in or outputs available where i do not now a purpose for yet...

See below the Actual situation.

253271

Killg0re NL
28-06-2018, 17:54
Small dillemma, i am limited with a Arduino Leonardo, all the in/outputs are adressed to the keymatrix and encoders.
So i can work with MCP's expanding the in/output possibility's.

So Arduino Leonardo for the buttonbox functions, and a separate Arduino+WiFi module(ESP8266) for showing the information comming from the game.

This will have one sketch for the Buttonbox, and another Two sketches (one WiFI sektch, and one arduino sketch)
So this might be easier when trouble occur.

Orrrrr

Heading over to a Arduino Due, that can simulate a keyboard aswell, and has loads of in/outputs, and a lot of processing power.
And can communicate with an ESP8266, and reflect the lights from PC2. (But the Due is bit more expensive, and all the code ends in one huge sketch, leaving debugging a bit more of a hassle..)


Putting these sketches on a Leonardo, will drag the Leonardo on its knees...

Killg0re NL
05-07-2018, 21:16
First post is updated.

This Buttonbox should work on Xbox, PS4 and PC

Sketch Changelog:
Deleted where the keys are for.
it is an buttonbox, it generated key strokes. When you connect the the switch and assign that key ingame it works nomatter the label in the sketch. So less confusion.
Deleted the ' funny led test as the arn't mucht leds left to test.
Updated the Info part, with ie. the Leonardo / Due pinout.
On startup, it prints on the serial line what version sketch it is.
When turning an encoder, it shows on the Serial line, CW or CCW or the alternative CW / CCW.
ATTENTION: Changed row / column pins


In the background still working on displaying ABS, TCS, ESP and Light status. (they are now on a different Arduino)

Killg0re NL
16-09-2018, 09:43
A minor update.
Am working on a PCB where you can wire the switches directly to. I am putting the finishing touch to it. And then to get a prototype.

Modular Design:
And to keep costs stackable, and having a good overview on the code. I think its wise to have the BB on one Arduino.

And the other Arduino for reflecting ABS, Light, TCS and ESP, and future stuff

So:
Arduino 1 for the inputs (BB)
Arduino 2 for reflecting the outputs.

This will make the BB multiplatform, and game independent.
And the output version is for now focussed on PC2.

(On Simracing expo 2018, i have seen other games as iRacing and Assetto Corsa on PC aswell.)

Killg0re NL
20-09-2018, 20:42
a PCB is in production, hopefully it is as i intend to how it should be designed.
Please note that there are allready some changes to this PCB. (Less via's)

260203

260202

260204

When it works i can release the Gerber files (wich you can make/order the PCB from)

Since i more or less decided to go for one Arduino for Inputs, and another Arduino for the Outputs

i have 3 pins available.

What would more benefit, more button's (fm 16 to 25) or another Encoder and 20 buttons?
Or a perhaps joystick?

Killg0re NL
13-10-2018, 13:39
PCB's are in. 261217
When they work i have some to spare / share.

They fit well on an Arduino, so parts for the PCB are ordered, next week i know of they function as planned.

Do you guys want:
5th encoder (10 functions in total)
20 buttons (now 16)

Or
4 encoders (8 functions in total)
30 buttons, with the current 4 encoders

Killg0re NL
27-10-2018, 17:58
Why settle when you can have both. (to choose from)

i created an PCB, where you can have
20 buttons and 5 encoders (10 functions), or
30 buttons and 4 encoders (8 fucntions)


Now time to work on the code.

Schematics
261545

Top PCB
261546

Bottom PCB
261547

Killg0re NL
19-11-2018, 08:22
The boards are in.

See an assembled board and empty board:
262237

beatrunner
19-11-2018, 10:18
just wanted to say: thanks for the fact you are sharing all this details here (it's all way above my head but you deserve lots of kudos and the best karma to be so generous and share all this technical stuff with us mostly unknown simracers). big tumps up :eagerness: