Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Mamehooker and Arduino  (Read 1561 times)

0 Members and 1 Guest are viewing this topic.

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 499
  • Last login:Today at 12:22:49 am
Mamehooker and Arduino
« on: May 09, 2016, 11:40:17 am »
This is someting only Howard can answer to, i suppose. I have no idea if what i am asking is for heaven or for hell, so sorry for that:  would it be possible for mamehooker to support/interact with arduino boards like with those other commercial boards listed in mamehooker site?

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 624
  • Last login:Today at 02:17:52 pm
  • I want to build my own arcade controls!
Re: Mamehooker and Arduino
« Reply #1 on: May 09, 2016, 06:37:55 pm »
I suppose not
It works perfectly fine work lwcloneU2. Using it on a mega right now.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17203
  • Last login:Today at 01:06:59 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker and Arduino
« Reply #2 on: May 09, 2016, 10:50:49 pm »
Yes, it's possible.  I'm working on my own sketch atm.  Basically you set up your avr to use serial communication and use the serial functions in mamehooker to control it. 

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 499
  • Last login:Today at 12:22:49 am
Re: Mamehooker and Arduino
« Reply #3 on: May 10, 2016, 12:38:31 am »
Howard, do you plan to post an easy sketch to show how to use the mamehooker serial comm function and arduino?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17203
  • Last login:Today at 01:06:59 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker and Arduino
« Reply #4 on: May 10, 2016, 12:58:26 pm »
Yes.  Currently all projects are on hold until I get my racing rig done.... I'm bad about getting side-tracked. 

I'm using a teensy to control the various I/O devices on my rig and serial communication to control it all.  That sketch is going to be available to all once I'm done. 

As for the 'easy' part.  Well, nothing, complex you do in Arduino, despite the easy to use language, is particularly easy.  I would say adding serial comm in any respect other than it's most basic would be considered medium difficulty.  In other words if you can program it won't be hard, but if you are a complete beginner there is a decent chance you will be lost.

Getting serial data from another source is super easy, but parsing it takes a bit of custom coding.  I set my sketch up to parse comma delimited commands and every command ends with a comma just to make things simpler.   It hasn't be tested enough to release though. 

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 624
  • Last login:Today at 02:17:52 pm
  • I want to build my own arcade controls!
Re: Mamehooker and Arduino
« Reply #5 on: May 10, 2016, 01:58:09 pm »
Use this: https://github.com/cithraidt/lwcloneu2

Done. It's all you could want in one firmware - Joystick, Keyboard and Mouse encoder, output device. Mamehooker will see it as LEDWIZ.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17203
  • Last login:Today at 01:06:59 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker and Arduino
« Reply #6 on: May 10, 2016, 02:36:02 pm »
It doesn't support a analog shifter, it doesn't allow remapping on the fly and it doesn't support matrix led displays.

That is pretty basic compared to what I'm building.  ;)  It could work for other people's projects though.  It's certainly nice to see that people are realizing that custom boards aren't really needed anymore in the hobby.  AVRs FTW!

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 624
  • Last login:Today at 02:17:52 pm
  • I want to build my own arcade controls!
Re: Mamehooker and Arduino
« Reply #7 on: May 10, 2016, 05:54:08 pm »
Yes, you are right that it doesn't support those things. Just wanted to make clear that Mamehooker allready works with an Arduino.

As long as someone makes it super easy to beginners to actually use arduinos - custom boards like u-hids, Ipacs and whatever will have their place.
Oh, and please check your PM's :)

matsadona

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 754
  • Last login:March 19, 2019, 06:13:38 am
Re: Mamehooker and Arduino
« Reply #8 on: May 24, 2016, 07:22:45 am »
Totally missed this thread until now, but I'm interested as well.
I am doing exactly this already in my flight simulator setup, having lights, instruments and switches connected (almost like a real cockpit). It is accomplished with a small middleware (DCS-Bios) and a standard Arduino board, with serial connection.

If you provide a tailor made sketch with all that extra, that would be very much appreciated.
Building, collecting and playing arcade machines :)

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 17203
  • Last login:Today at 01:06:59 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Mamehooker and Arduino
« Reply #9 on: May 25, 2016, 03:48:51 pm »
Well real world stuff is in the way, so it's taking longer than expected.  Basically my racing cab is wood and I'm staining certain parts of it so I've been sanding, filling and scraping every evening.  I'm hoping to get it stained this evening or tomorrow, then comes re-assembly and then I can test the sketch more thoroughly on the hardware it was designed for and tweak a few things.   

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 499
  • Last login:Today at 12:22:49 am
Re: Mamehooker and Arduino
« Reply #10 on: September 03, 2018, 10:48:14 am »
Use this: https://github.com/cithraidt/lwcloneu2

Done. It's all you could want in one firmware - Joystick, Keyboard and Mouse encoder, output device. Mamehooker will see it as LEDWIZ.

Sorry for calling this topic back from the grave. I lost track of it and gave not the right weight to Endprodukt firmware... looks great!
Let me ask you something:

1- Where can i found a pinout to use the board after firmware "installation"? I mean: which pins are set as outputs (ledwiz part) and which are set as inputs (you said that a joystick and a mouse are emulated)?
2- How could an arduino uno emulate a joystick or a mouse? Does it need a background running program to work? If not, where is the advantage using a leo instead of a uno? the processor speed eventually?

I would (and will) prefer to work on a sketch I can "read" and understand and bend at my will based on serial port reading for the mamehooker's side, but this could be an alternative and I want to dig this a little bit more now  ;D

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 7149
  • Last login:Today at 02:11:29 pm
  • Designated spam hunter
Re: Mamehooker and Arduino
« Reply #11 on: September 04, 2018, 07:49:26 am »
1- Where can i found a pinout to use the board after firmware "installation"? I mean: which pins are set as outputs (ledwiz part) and which are set as inputs (you said that a joystick and a mouse are emulated)?
+1 on adding a pinout list on GitHub.

Since it works with both 32u2 and 32u4 AVR boards it would be very helpful to have a PDF/JPG/PNG containing two tables like these:

32u2 pin -- 32u2 port ------- Function
   3                                          GND
   4                                          VCC
   5           PC2(AIN2/PCIN11)  Joy Up?
. . .

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

32u4 pin -- 32u4 port ------ Function
     1           PE6(INT6/AIN0)  LED1?
   14                                     VCC
   15                                     GND
. . .

By including the processor (not board) pin numbers and port names, users can easily identify which wire goes where on a wide variety of boards using either board markings or schematics.


Scott