XIM Community

Tut: Microcontrollers as a HID device(s) on XIM adapters.  (Read 65857 times)

Offline roads

  • MVP
  • *
  • Posts: 19556
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #15 on: 12:20 PM - 01/20/13 »


This is an arduino mini controlling a G400 also a W11ce project I was allowed to build.
Crusade atm: none

Offline Boltman

  • MVP
  • *
  • Posts: 1186
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #16 on: 12:56 PM - 01/20/13 »


This is an arduino mini controlling a G400 also a W11ce project I was allowed to build.

I've seen videos and I'm semi familiar (now) with what it's all about, sounds very promising indeed.

A few out there with very minimal views of people doing some pretty dubious things hehe.
Keyboard replacement: Sony Move Navigation Controller l Mouse: Logitech G9x l Mousepad: MM400 l Controller: PS4 l XIM: Edge l Gaming Monitor: 24" BenQ RL2450HT prad.de rated 4 of 5 stars (gut!) l Headset: Sony Gold Wireless Headset


My config/setup: http://www.xim3.com/community/index.php?topic=25362.msg306559#msg306559

Offline roads

  • MVP
  • *
  • Posts: 19556
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #17 on: 01:01 PM - 01/20/13 »
Itís a great step to get out of the badly designed input devices and make something much better.
Crusade atm: none

Offline W11cE

  • MVP
  • *
  • Posts: 1517
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #18 on: 01:40 PM - 01/20/13 »
Ok, i will make this tutorial a little more noob friendly.

roads here is your code for 11 buttons:
Code: [Select]
#define BUTTONSREVERSED

void setup() {
  pinMode(0, INPUT_PULLUP);
  pinMode(1, INPUT_PULLUP);
  pinMode(2, INPUT_PULLUP);
  pinMode(3, INPUT_PULLUP);
  pinMode(4, INPUT_PULLUP);
  pinMode(5, INPUT_PULLUP);
  pinMode(6, INPUT_PULLUP);
  pinMode(7, INPUT_PULLUP);
  pinMode(8, INPUT_PULLUP);
  pinMode(9, INPUT_PULLUP);
  pinMode(10, INPUT_PULLUP);
}

void loop() {
 Joystick.X(analogRead(0));
 Joystick.Y(analogRead(1));
 Joystick.button(1, digitalRead(0));
 Joystick.button(2, digitalRead(1));
 Joystick.button(3, digitalRead(2));
 Joystick.button(4, digitalRead(3));
 Joystick.button(5, digitalRead(4));
 Joystick.button(6, digitalRead(5));
 Joystick.button(7, digitalRead(6));
 Joystick.button(8, digitalRead(7));
 Joystick.button(9, digitalRead(8));
 Joystick.button(10, digitalRead(9));
 Joystick.button(11, digitalRead(10));
}

Connect buttons between ground and digital pins. Pin 0 = button 1 and pin 10 = button 11. And others between those in order.

Offline roads

  • MVP
  • *
  • Posts: 19556
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #19 on: 01:58 PM - 01/20/13 »
Thanks Master W11ce I am good to go.
Crusade atm: none

Offline THE-MARAVINGY

  • MVP
  • *
  • Posts: 760
    • View Profile
  • PSN ID: ApocalypticWesal
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #20 on: 05:00 AM - 01/21/13 »
Excuse me for sounding dumb but what does that thing do qyboshed into your mouse, or rather what does it do and how or where can i use it.

Offline roads

  • MVP
  • *
  • Posts: 19556
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #21 on: 05:30 AM - 01/21/13 »
Oh thatís an arduino mini and it lights up three Diodes LOL

Just kidding, its Skynet.
« Last Edit: 05:35 AM - 01/21/13 by roads »
Crusade atm: none

Offline THE-MARAVINGY

  • MVP
  • *
  • Posts: 760
    • View Profile
  • PSN ID: ApocalypticWesal
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #22 on: 05:52 AM - 01/21/13 »
Cheers Roads thanks for the heads up i will look into this a bit more.

Offline W11cE

  • MVP
  • *
  • Posts: 1517
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #23 on: 11:13 AM - 01/21/13 »
Roads how do you like the new wiring pic? And how is your wiring going? And does the code even work?

Offline roads

  • MVP
  • *
  • Posts: 19556
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #24 on: 11:26 AM - 01/21/13 »
Quote
For people that are scared of breadboards (like roads...)

This is not funny at all, not at all. :)
The new wiring pic is quite easy no you dont have to know much to solder those cables.

« Last Edit: 11:40 AM - 01/21/13 by roads »
Crusade atm: none

Offline roads

  • MVP
  • *
  • Posts: 19556
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #25 on: 11:30 PM - 01/21/13 »
Here is a 10 minute solder of a Cherry Keyboard with analoge stick that is by definition already better than 90% of all left hand input devices out there as it has cherry keys and an analogue joystick :D.


Mac OSX be sure the files are in the right location. Open the Arduino app for this and look for the java folder. If you copied all files correctly you will see the example code in the arduino software and you will be able to choose the XIM Joystick instead of the standard Teensy joysticks.








« Last Edit: 11:55 PM - 01/21/13 by roads »
Crusade atm: none

Offline W11cE

  • MVP
  • *
  • Posts: 1517
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #26 on: 03:19 AM - 01/22/13 »
Nice pics roads :) but the last one is a little wrong. The example should be in examples menu, not in scetchbook. And that code on the background is not exactly the example one.

Offline roads

  • MVP
  • *
  • Posts: 19556
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #27 on: 03:33 AM - 01/22/13 »
Crusade atm: none

Offline W11cE

  • MVP
  • *
  • Posts: 1517
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #28 on: 03:36 AM - 01/22/13 »
Ok, thanks. Ill add these to the tutorial. Is it ok ?

Offline roads

  • MVP
  • *
  • Posts: 19556
    • View Profile
Re: Tut: Teensy 3.0 as a HID device on XIM3 and Edge (and PC)
« Reply #29 on: 04:20 AM - 01/22/13 »
That is why I made them, sorry its German.

I can confirm that all my 4 buttons (11 showing but only 4 attached) are working in Joy.cpl in windows7 as well as the analog Joystick. Someone else will have to test this on the Xbox as I sold mine.

Really simple to build.
Crusade atm: none