Skip to content

48productions/PIUIO_Arduino

 
 

Repository files navigation

Arduino Uno PIUIO

Emulates a Pump it Up IO board (a.k.a. MK6 PIUIO) using an Arduino Uno. Tested and working with both input and lighting with Pump it Up Prime 2015, Stepmania 5 on Linux with djpohly's input driver, and on Windows with IO2KEY.

Hardware wiring

Check out the ArduinoPIUAux_Lights folder for a schematic and more details on wiring a DIY Pump it Up setup.

Software setup (one-time)

In order to trick the official Pump it Up software into thinking your Arduino is a PIUIO, you need to flash new code onto your Arduino's USB<->Serial microcontroller. Once flashed, your Arduino will now show up on any PC it's plugged into as a PIUIO instead of an Arduino!

This means two things:

  1. If your Arduino board does not use the same USB<->Serial microcontroller that an official Uno uses, this code will not work on your board! Either grab an UNO, or use this alternative code that will work on any ATMEGA328, but requires you wire up a separate USB port.
  2. When in PIUIO mode, you cannot upload new code to your Arduino.

As intimidating as it sounds, this process is 100% reversible and not permanent!

First:

  1. Upload ArduinoPIUAux_Lights.ino onto your Arduino Uno (as you would a regular Arduino sketch)

In linux (or WSL if you're on Windows 8/10), run these commands in a Linux terminal:

  1. sudo apt-get install build-essential git gcc-avr avr-libc
  2. git clone https://github.com/48productions/PIUIO_Arduino
  3. cd to the cloned folder and delete the lufa folder
  4. git clone https://github.com/abcminiuser/lufa
  5. make
  6. Move PIUIO.hex,elf,bin,eep,lss,map,sym into ATmega8u2Code/HexFiles

Now in Windows:

  1. Install FLIP: https://www.microchip.com/developmenttools/ProductDetails/flip
  2. Plug in the Arduino UNO
  3. Note down the port you plugged it into in device manager, you will need it later
  4. Put the UNO into DFU mode - With the Uno oriented with the USB port to the left, briefly bridge the left two pins on the 2x3 header near the USB port. Windows will make the device unplug sound.
  5. You may need to install the DFU device if the below script fails to run. Go into device manager, find the port you noted down earlier. Update the drivers, select "have disk", naviate to "Program Files (x86)/Atmel/Flip 3.4.7/usb/" and then double click the inf. (todo: better instructions)
  6. After the drivers are set up correctly, run TurnIntoAPIUIO.bat.

Congrats, your Arduino is now a PIUIO and your journey is complete!

Note that if your Arduino is acting as a PIUIO, you cannot upload new code. To update the code, you'll need to switch the Arduino back into acting like an Arduino.

  1. Navigate to C:\Program Files (x86)\Arduino\hardware\arduino\avr\firmwares\atmegaxxu2\arduino-usbserial
  2. Copy Arduino-usbserial-uno.hex into HexFiles
  3. Put your Arduino into DFU mode (step 3, above) and run the TurnIntoAnArduino.bat script.
  4. Upload your new code, then put the Arduino in DFU mode and run TurnIntoAPIUIO.bat to turn your Arduino back into a PIUIO.

About

PIUIO USB handler for arduino uno

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 64.6%
  • C++ 18.6%
  • Makefile 14.7%
  • Batchfile 2.1%