Skip to content

wimberlyw/ardumiibo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduboy Pro Rumble - With Ardumiibo Scanner

The Arduboy Pro Rumble itself is a homemade Leonardo backpack that has a vibration motor attached to Speaker Pin 2. Game makers can use the Arduboy2 Tones commands to add rumble to their game. The system also features broken out Serial connection to connect the the Ardumiibo Scanner and future peripherals.

The Ardumiibo scanner is a PN532 NFC Scanner with a Neopixel ring that can scan collectible items from the real world into your game.

An Arduboy based nod to Tiger Electronics handhelds, Rumble Features, and Amiibos

Cover

TOC

  1. Bill of Materials
  2. Assembly
    • Arduboy Pro Rumble Game Console
    • Powerboost
    • Boost Cables
    • Scanner
  3. Software
  4. Examples

Materials Needed:

Arduboy Pro Rumble:

Ardumiibo Scanner

Assembly

- Good luck.
  • Add hot glue as wire stress relief as you go.

  • Start printing the 3d printer files listed in the 3d parts section of this Github or listed in the BOM above.

Arduboy Pro Rumble

  • You can either contact me for a pcb and I can order some more, you can make your own using the schematics from the giuthub, or you can breadboard this out. Up to you.

Front side PCB

  1. Solder the Male header pins into the middle of the PCB so that it's like a backpack for the Leonardo. The Male pins on the PCB face DOWN towards the Leonardo female pins. backpack

  2. Solder in your two resistors top right, and the 7x tactile buttons onto the top of the board.

  3. Solder in your Screen. All the pins should line up on the left hand side. If you're breadboarding this, refer to the schematics for how to hook up the display.

  • The only items facing the front of the PCB are the buttons and those two resistors. And the Screen

Back Side PCB

  1. Install female header pins where the broken out ICSP header is.
  2. Directly beneath the female header pins, install the third resistor.
  3. Solder in the transistor with the flat part facing up, curved part towards the bottom.
  4. Solder in the diode with the white stripe facing the way it is on the board. Once again refer to the schematic for help, or the pictures on the pcb.
  5. Install the capacitor with negative stripe facing the right.

rumble

  • I would install the Speaker, vibraating motor, and RGBLED on the back of the PCB.
  1. The vibrating motor goes on the two holes to the right of the capacitor circuit. Install the vibrating motor with ground wire on the left. (If PCB back is facing you.)

  2. The speaker is labeled for the front, but I find it works better on the bottom of the board. the speaker wire holes are directly left of the diode.(If PCB back is facing you.) Solder in the piezo speaker with the positive wire on the left.

  3. The serial cable wires are also labeled for the top, but I like them better on the bottom. You should be able to see the traces on the PCB. If the back of the OCB is facing you RX is the left hole of the gold pads. TX is the right. (the front of the board has them labeled as JP1.)

  4. You're also going to need to tack a ground wire onto one of the nubs of a ground wire, as you need this for serial and I forgot.

  • This illustrates the ground wire, but the other wires are on top, which I mentioned not to do.

Ground

At this point you should be able to backpack the PCB onto the Leonardo

Now we need to make the booster cables so we can power up the arduino.

  • You should probably hook everything up to your data cable at this point and run the included "Rumble Demo" to make sure everything's working right. We're about to cut up that data cable so, test it now, anyway.

Powerboost and Booster Cables

  1. Follow the directions from Adafruit to hook up a switch to your Powerboost. You're going to want to mount the switch with wires instead of directly to the board so we can remote mount it.

You may as well wire up both powerboosts, and make two boost cables. We need the boost cables to be able to pass data through .

  1. https://learn.adafruit.com/booster-cable

It's Time To

Shove thaat thang in the case.

Let me just preface this with I didn't know the powerboost would take up so much room. They look so small.

And I'm new to Fusion360.

Sowwy.

Do your best to put everything in the case and rout the USB out the top holes, and the Serial cable out the bottom. It's pretty self explanatory so here are some pictures of how I did it. Feel free to design your own case at this point.

Glue down the Piezo and the vibrating motor to the back inside of the, where the empty resources are. You probably want to add a few dabs of glue to the front part of the case to keep your d pad in place, too.

inthere

inthere

inthere

Should look like this

done

Ardumiibo Scanner Assembly

  1. On the PN532 NFC RFID module Solder on the 4 90 degree pins that came with your module so that they are sticking out the side that reads "TXD RXD"
  2. Carefully switch the module to IIC/ I2c mode by flipping the jumper.
  1. The Arduino Pro Micro will sit in the bottom of the Scanner case, along with the Powerboost hooked up to it's booster cable
  1. The middle bdoy is where the PN532 will sit, and you will pass wires through the holes to the bottom of the case. (If you've printed the case this will be very evident.)
  2. The top faceplate is in 3 parts, and the NEOPIXEL ring is glued into the back of the light diffuser ring part.
  3. Run the wires from the top section of the box where the LEDs are, THrough the body, and into the base so you can solder them into the Pro Micro as follows.
Pro Micro Module
VCC VCC PN532
VCC 5v LED Ring
GND GND PN532
GND GND LED Ring
Pin 2 PN532/ SDA
PIN 3 PN532/ SCL
PIN 4 LED Ring Data In

RFIDclose

ScanTop

Unfortunately I can't show you the wires in the pro micro because fitting everything in the box is a hard task. Once it's in there, it's in.

  • Use plenty of hot glue for attaching and wire stress relief.

Software

Load your scanner Pro Micro up with the NFC Reader

Load your Arduboy Pro Rumble up with the example ScanDemo

-https://github.com/wimberlyw/ardumiibo/tree/main/Examples

Check out the video tutorial on how to make an Ardumiibo.

Try the "Turbo Waddle" Demo!

Make your own game with Rumble!

  • Rumble just uses the Tone library BeepPin2.
  • Essentially The scanner is just passign a string over serial.
    • Read the examples!

void setup() 
{rumble.begin();//Set up Rumble Motor}
  
	 if (arduboy.justPressed(B_BUTTON)) {

	rumble.tone(beep.freq(523.251), 5); /beep.freq(523.251) is used to convert 523.251Hz to the required count
	} 

Make your own game with Ardumiibo Support!

  1. Turn on :
  • power_usart1_enable(); // Arduboy turns off serial power, so we need that to connect to the RFID reader
  • Serial1.begin(115200);// Begin communication with the Serial port/ Reader over Serial 1"
  1. Set up a dummy string to save the message we receive from Serial. String Message;//Storing messages from the scanner as a string here.

  2. If the Serial is receiving a message, check to see if it's ours.

  • If it is, do something.

THIS LINE MAKES SERIAL NOT LOCK UP EVERYTHING BY SCANNING ALL THE TIME, BUT ONLY WHEN DATA COMES You could do a "Blocking" version if you wanted the user to be stuck somewhere until they scan something. Just don't include serial available.

if(Serial1.available()){ Message = Serial1.readStringUntil('\r'); //Store incoming data

  if(Message != ""){    
    
    //We've found that the writer apps put an extra " en/" in the string, so we take it out. 
    Message.remove(0,3);
            
                      
    // if it exists, do stuff.
      if(Message.indexOf(potionCode) >= 0){      //if our code exists in what was scanned
                                //do stuff
        Serial1.flush();   //Clear the serial buffer of any info
        arduboy.delayShort(1000);    //add a lil delay time
        heartsEarned++; 
       }

That's really all you need to set up your game to read from the scanner!

Releases

No releases published

Packages

No packages published

Languages