WII U RASPBERRY PI 3 FINISHED

Want to show off your own project? Want to keep a build log of it? Post it here!
Post Reply
User avatar
banjokazooie
Posts: 211
Joined: Thu May 19, 2016 1:14 pm
Location: Usa
Been thanked: 171 times
Contact:

WII U RASPBERRY PI 3 FINISHED

Post by banjokazooie » Sun Oct 09, 2016 11:14 am

My finished WII U raspberry pi

Features:
Original WII U shell
ON/OFF Push button to power up and down + automatic system shutdown when low battery using lipopi script from Daniel Bull
Front blue power on indicator
Low, charging and charged Battery indicator
Micro USB charging port
Headphones Audio jack with automatic speaker disconnection
Front USB port
Volume control
External SD card reader at the bottom
2x analog joystick
1x D pad
14x buttons

What is inside:

RPI3
USB DAC SOUNDCARD
TEENSY 2.0
CHARGING CIRCUIT
POWERBOOST 1000 BASIC
6.5" HDMI DISPLAY
BATTERY 2x PANASONIC 3400mAH
BATTERY PROTECTION CIRCUIT 8A
2x3 W D-class amplifier
Flat FPC HDMI Cable
FPC to DIP adapters for connecting original controls

Technical details:

Running time is about 3 hours tested on N64.
Total current draw from batteries is around 1.7A
( 1.1A LCD + RPI+ ACCESORIES and 0.6A losses on powerboost )
This is a real life performance but might draw even more when RPI is maxed out.

Teensy Update:

For better analog input in N64 games change any instances of 1.8 like in here " rX = (rX - 512) * 1.8 + 512; " to 1.5.
The analog range is going to be shorter hence joystick is not so sensitive. Retropie is still able to register analog on setup screen but unfortunately you will loose analog movement in psx games. Crash bandicoot is not running anymore :(
Added ESC key for home button to teensy code.

Teensy Update 2:

Home button action modified to switch between Joystick and Keyboard. Now usable in Amiga emulator. Joystick buttons reassigned to match actual wiring.

Code: Select all

const int  MODE = 15;    // the pin that the pushbutton is attached to
const int LED = 11;

int buttonPushCounter = 0;   // counter for the number of button presses
int buttonState = 0;         // current state of the button
int lastButtonState = 0;

void setup() {


  pinMode(0, INPUT_PULLUP);       // 01 Left Shoulder
  pinMode(1, INPUT_PULLUP);       // 02 Lelf Trigger
  pinMode(2, INPUT_PULLUP);       // 03 Right
  pinMode(3, INPUT_PULLUP);       // 04 Left
  pinMode(4, INPUT_PULLUP);       // 05 Up
  pinMode(5, INPUT_PULLUP);       // 06 Down
  pinMode(6, INPUT_PULLUP);       // 07 B
  pinMode(7, INPUT_PULLUP);       // 08 A
  pinMode(8, INPUT_PULLUP);       // 09 Right Trigger
  pinMode(LED, OUTPUT);           // LED
  pinMode(12, INPUT_PULLUP);      // 13 Start
  pinMode(13, INPUT_PULLUP);      // 14 Select
  pinMode(14, INPUT_PULLUP);      // 15 Y
  pinMode(MODE, INPUT_PULLUP);    // HOME Button
  pinMode(18, INPUT_PULLUP);      // 19 Left Joystick Button
  pinMode(19, INPUT_PULLUP);      // 20 Right Joystick Button
  pinMode(22, INPUT_PULLUP);      // 23 Right Shoulder
  pinMode(23, INPUT_PULLUP);      // 24 X

//  Serial.begin(9600);

 }

void loop_joystick() {

if (digitalRead(0) == LOW) 
  {
        Joystick.button(1, 1);
  }
  else
  {
    Joystick.button(1, 0);
    }

if (digitalRead(1) == LOW)
  {
      Joystick.button(2, 1);
  }
  else
  {
      Joystick.button(2, 0);
  }

if (digitalRead(2) == LOW)
  {
  Joystick.button(3, 1);
  }
  else
  {
  Joystick.button(3, 0);
  }

if (digitalRead(3) == LOW)
  {
  Joystick.button(4, 1);
  }
  else
  {
  Joystick.button(4, 0);
  }

if (digitalRead(4) == LOW)
  {
  Joystick.button(5, 1);
  }
  else
  {
  Joystick.button(5, 0);
  }

if (digitalRead(5) == LOW)
  {
  Joystick.button(6, 1);
  }
  else
  {
  Joystick.button(6, 0);
  }

if (digitalRead(6) == LOW)
  {
  Joystick.button(7, 1);
  }
  else
  {
  Joystick.button(7, 0);
  }

if (digitalRead(7) == LOW)
  {
  Joystick.button(8, 1);
  }
  else
  {
  Joystick.button(8, 0);
  }

if (digitalRead(8) == LOW)
  {
  Joystick.button(9, 1);
  }
  else
  {
  Joystick.button(9, 0);
  }

if (digitalRead(12) == LOW)
  {
  Joystick.button(13, 1);
  }
  else
  {
  Joystick.button(13, 0);
  }

if (digitalRead(13) == LOW)
  {
  Joystick.button(14, 1);
  }
  else
  {
  Joystick.button(14, 0);
  }
  
if (digitalRead(14) == LOW)
  {
  Joystick.button(15, 1);
  }
  else
  {
  Joystick.button(15, 0);
  }
  

if (digitalRead(18) == LOW)
  {
  Joystick.button(19, 1);
  }
  else
  {
  Joystick.button(19, 0);
  }

if (digitalRead(19) == LOW)
  {
  Joystick.button(20, 1);
  }
  else
  {
  Joystick.button(20, 0);
  }

if (digitalRead(22) == LOW)
  {
  Joystick.button(23, 1);
  }
  else
  {
  Joystick.button(23, 0);
  }

if (digitalRead(23) == LOW)
  {
  Joystick.button(24, 1);
  }
  else
  {
  Joystick.button(24, 0);
}

  int rX = analogRead(4);
    rX = (rX - 512) * 1.5 + 512;
  if (rX > 1023)
    rX=1023;  
  if (rX < 0)
    rX = 0;
  
  int rY = analogRead(5);
    rY = (rY - 512) * 1.5 + 512;
  if (rY > 1023)
    rY=1023;   
  if (rY < 0)
    rY = 0;
    rY=abs(1023-rY);

  int rL = analogRead(0);
    rL = (rL - 512) * 1.5 + 512;
  if (rL > 1023)
    rL=1023;  
  if (rL < 0)
    rL = 0;
  
  int rR = analogRead(1);
    rR = (rR - 512) * 1.5 + 512;
  if (rR > 1023)
    rR=1023;   
  if (rR < 0)
    rR = 0;
    //rR=abs(1023-rR);
 
  Joystick.X(rX);
  Joystick.Y(rY);
  Joystick.sliderLeft(rL);
  Joystick.sliderRight(rR);
}

  
void loop_keyboard() {

    if (digitalRead(4) == LOW)
  {
    Keyboard.press(KEY_UP);
  }
  else
  {
    Keyboard.release(KEY_UP);
   }
   
  if (digitalRead(5) == LOW)
  {
    Keyboard.press(KEY_DOWN);
  }
  else
  {
    Keyboard.release(KEY_DOWN);
  }
   
  if (digitalRead(3) == LOW)
  {
    Keyboard.press(KEY_LEFT);
  }
  else
  {
    Keyboard.release(KEY_LEFT);
  }
  
  if (digitalRead(2) == LOW)
  {
    Keyboard.press(KEY_RIGHT);
  }
  else
  {
    Keyboard.release(KEY_RIGHT);
  }

  //buttons
  if (digitalRead(0) == LOW)
  {
    Keyboard.press(KEY_ENTER);
  }
  else
  {
    Keyboard.release(KEY_ENTER);
  }
  if (digitalRead(1) == LOW)
  {
    Keyboard.press(KEY_ESC);
  }
  else
  {
    Keyboard.release(KEY_ESC);
  }

if (digitalRead(22) == LOW)
  {
    Keyboard.press(KEY_LEFT_CTRL);
  }
  else
  {
    Keyboard.release(KEY_LEFT_CTRL);
  }

  if (digitalRead(8) == LOW)
  {
    Keyboard.press(KEY_LEFT_ALT);
  }
  else
  {
    Keyboard.release(KEY_LEFT_ALT);
  }

if (digitalRead(7) == LOW)
  {
    Keyboard.press(KEY_A);
  }
  else
  {
    Keyboard.release(KEY_A);
  }
  if (digitalRead(6) == LOW)
  {
    Keyboard.press(KEY_B);
  }
  else
  {
    Keyboard.release(KEY_B);
  }
  if (digitalRead(14) == LOW)
  {
    Keyboard.press(KEY_Y);
  }
  else
  {
    Keyboard.release(KEY_Y);
  }
  if (digitalRead(23) == LOW)
  {
    Keyboard.press(KEY_X);
  }
  else
  {
    Keyboard.release(KEY_X);
  }

  if (digitalRead(12) == LOW)
  {
    Keyboard.press(KEY_F12);
  }
  else
  {
    Keyboard.release(KEY_F12);
  }
   if (digitalRead(13) == LOW)
  {
    Keyboard.press(KEYPAD_5);
  }
  else
  {
    Keyboard.release(KEYPAD_5);
  }

}


void loop() {

  buttonState = digitalRead(MODE);
  if (buttonState != lastButtonState) {
  if (buttonState == HIGH) {
    buttonPushCounter++;
//    Serial.println("on");
//      Serial.print("number of button pushes:  ");
//      Serial.println(buttonPushCounter);
} 
    else {
//  Serial.println("off");
    }
  }
  lastButtonState = buttonState;
  
 if (buttonPushCounter % 2 == 0) {
    digitalWrite(LED, HIGH);
  } else {
   digitalWrite(LED, LOW);
  }
  

    if (digitalRead(LED) == LOW)
  {
     loop_joystick();
  }
  else
  {
    
     loop_keyboard();
  }
  }


Image

Image

Image

Image

Image


Lipo script for power on/off

https://github.com/craic/pi_power

Teensy 2.0 code and wiring

Image
Image
Image
Image
Last edited by banjokazooie on Thu Dec 08, 2016 11:50 am, edited 6 times in total.

TimBer
Posts: 38
Joined: Tue Sep 13, 2016 1:42 am
Has thanked: 4 times
Been thanked: 11 times

Re: WII U RASPBERRY PI 3 FINISHED

Post by TimBer » Sun Oct 09, 2016 11:24 am

Really really nice!!!!

Wondering if you sacrificed a working wii u controller for this........

User avatar
Helder
Trailblazer
Trailblazer
Posts: 2985
Joined: Thu May 05, 2016 8:33 am
Location: Rogers, AR
Has thanked: 1459 times
Been thanked: 3114 times

Re: WII U RASPBERRY PI 3 FINISHED

Post by Helder » Sun Oct 09, 2016 11:28 am

Could you post links to the parts you used? Nice work.
Chat with me and other members On Discord

Don't contact me about obtaining my board files (as you will not get them). If my Boards or PCB Kits are sold out, they will be restocked as soon as I can get them and there is demand for them. You can join the mailing list on my Website to be notified when they are available.


Helder's Game Tech Website

We will not support any cloned work so don't come to us with technical issues to resolve, go talk to the cloner for help.


User avatar
ABH
Posts: 188
Joined: Sat May 28, 2016 7:01 pm
Location: Qatar
Has thanked: 82 times
Been thanked: 113 times

Re: WII U RASPBERRY PI 3 FINISHED

Post by ABH » Sun Oct 09, 2016 11:56 am

Great work , Thanks for sharing

Daniel_N
Posts: 39
Joined: Fri Aug 05, 2016 12:56 am
Has thanked: 3 times
Been thanked: 3 times

Re: WII U RASPBERRY PI 3 FINISHED

Post by Daniel_N » Sun Oct 09, 2016 2:40 pm

Wermy? I think we found your new project ;D

User avatar
wermy
Site Admin
Posts: 1346
Joined: Tue May 03, 2016 8:51 pm
Has thanked: 620 times
Been thanked: 1322 times
Contact:

Re: WII U RASPBERRY PI 3 FINISHED

Post by wermy » Sun Oct 09, 2016 9:26 pm

Nicely done! :D I've got something planned for the wii u controller myself, just need to find the time to do it. :)
ImageImageImageImage

User avatar
Fleder
Posts: 849
Joined: Thu May 05, 2016 9:04 am
Location: Germany
Has thanked: 183 times
Been thanked: 258 times

Re: WII U RASPBERRY PI 3 FINISHED

Post by Fleder » Mon Oct 10, 2016 12:33 am

Great work here [mention]banjokazooie[/mention]!
Would you mind posting some tips or hurdles you encountered during this, that would help someone working on the WII U Gamepad?

User avatar
Mischief
Posts: 225
Joined: Sat May 21, 2016 7:50 am
Location: Wolverhampton, UK
Has thanked: 29 times
Been thanked: 69 times

Re: WII U RASPBERRY PI 3 FINISHED

Post by Mischief » Mon Oct 10, 2016 1:10 am

That looks awsome :D

User avatar
jothie
Posts: 17
Joined: Mon Jul 18, 2016 2:20 am
Has thanked: 8 times
Been thanked: 1 time

Re: WII U RASPBERRY PI 3 FINISHED

Post by jothie » Mon Oct 10, 2016 6:10 am

I'd love to see a video of this in action

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest