Monthly Archives: May 2015

Arduino – Amiibo Stand

Hello everyone. Today I want to show you something awesome I discovered on the internet.

I saw this awesome video here made by the user Modus Pwnin who created an Interactive Amiibo Stand for his Amiibos. I was absolutely amazed by his awesome project and wanted to build one for myself too. Thanks to his great tutorial he provided here I was able to do it. Since I´ve never used an Arduino before I had some troubles to get this up and running so I decided to share my experiences with you so that you can profit from them.

Ok. Let´s begin.

Here is a short list of things you will need:

Hardware:

If you have everything you need we can begin with our setup.

Setup:

All instructions you find below are from the Babel Fish tutorial of Adafruit Industries.

First we will take care of the Adafruit PN532 RFID/NFC Shield:

Solder the pins to the outer lines like in the picture below: (Source of instructions)

amiibo_stand_nfc_before

Next you need to do the following:

  • Use a knife to cut the connection between pin 2 and pin IRQ
  • Next use a piece of wire to connect pin IRQ and pin 6

It should look like this afterwards:

amiibo_stand_nfc_after

Next you need to build the Adafruit Wave Shield. (Source of instructions)

It´s not too hard to build. Here is a tutorial how to build it step by step.

Important: The black rectangles on top of the board are not included in the package of the Adafruit Wave Shield. I bought them from here.

When you have soldered all pieces to your Wave Shield board it should look like this:

amiibo_stand_waveshield

Next put your Adafruit Wave Shield on top of your Arduino Uno and put the Adafruit NFC/RFID Shield on top of the Adafruit Wave Shield.

It should look like this afterwards:

amiibo_stand_finished

And your Hardware Setup is done.

Software:

Next you will need to setup the necessary software before you can start programming your Arduino Uno.

The first step is to connect your USB A to B cable to your Arduino Uno and plug it into your computer.

Now download the Arduino software installer from here and start the installation.

After the installation has finished you need to add the following libraries to this path “C:\Program Files (x86)\Arduino\libraries“:

amiibo_stand_arduino_libraries

Now open the Arduino program.

amiibo_stand_arduino_start

Now paste this code into the Arduino program: (This code was written by Modus Pwnin)


#include <WaveHC.h>
#include <WaveUtil.h>
#include <Wire.h>
#include <Adafruit_NFCShield_I2C.h>
//#include <MemoryFree.h>

//Loading Strings into PROGMEM to save RAM
#include <avr/pgmspace.h>
//Character Intro File Names
const char string_0[] PROGMEM = "cfalc.wav";
const char string_1[] PROGMEM = "samus.wav";
const char string_2[] PROGMEM = "lmac.wav";
const char string_3[] PROGMEM = "fox.wav";
const char string_4[] PROGMEM = "wft.wav";
const char string_5[] PROGMEM = "villager.wav";
const char string_6[] PROGMEM = "marth.wav";
const char string_7[] PROGMEM = "yoshi.wav";
const char string_8[] PROGMEM = "pit.wav";
const char string_9[] PROGMEM = "kirby.wav";
const char string_10[] PROGMEM = "pikachu.wav";
const char string_11[] PROGMEM = "link.wav";
const char string_12[] PROGMEM = "luigi.wav";
const char string_13[] PROGMEM = "luigi2.wav";
const char string_14[] PROGMEM = "diddy.wav";
const char string_15[] PROGMEM = "dk.wav";
const char string_16[] PROGMEM = "peach.wav";
const char string_17[] PROGMEM = "zelda.wav";
const char string_18[] PROGMEM = "mario.wav";
const char string_19[] PROGMEM = "tlink.wav";
const char string_20[] PROGMEM = "dede.wav";
const char string_21[] PROGMEM = "lucario.wav";
const char string_22[] PROGMEM = "bowser.wav";
const char string_23[] PROGMEM = "mega.wav";
const char string_24[] PROGMEM = "sonic.wav";
const char string_25[] PROGMEM = "rosa.wav";
const char string_26[] PROGMEM = "mk.wav";
const char string_27[] PROGMEM = "shulk.wav";
const char string_28[] PROGMEM = "sheik.wav";
const char string_29[] PROGMEM = "ike.wav";
//Wave 4
const char string_60[] PROGMEM = "robin.wav";
const char string_61[] PROGMEM = "lucina.wav";
const char string_62[] PROGMEM = "char.wav";
const char string_63[] PROGMEM = "wario.wav";
const char string_64[] PROGMEM = "pacman.wav";
const char string_65[] PROGMEM = "ness.wav";
//Songs
const char string_30[] PROGMEM = "cfalc_s.wav";
const char string_31[] PROGMEM = "samus_s.wav";
const char string_32[] PROGMEM = "lmac_s.wav";
const char string_33[] PROGMEM = "fox_s.wav";
const char string_34[] PROGMEM = "wft_s.wav";
const char string_35[] PROGMEM = "vil_s.wav";
const char string_36[] PROGMEM = "marth_s.wav";
const char string_37[] PROGMEM = "yoshi_s.wav";
const char string_38[] PROGMEM = "pit_s.wav";
const char string_39[] PROGMEM = "kirby_s.wav";
const char string_40[] PROGMEM = "pika_s.wav";
const char string_41[] PROGMEM = "link_s.wav";
const char string_42[] PROGMEM = "luigi_s.wav";
const char string_43[] PROGMEM = "luigi2_s.wav";
const char string_44[] PROGMEM = "diddy_s.wav";
const char string_45[] PROGMEM = "dk_s.wav";
const char string_46[] PROGMEM = "peach_s.wav";
const char string_47[] PROGMEM = "zelda_s.wav";
const char string_48[] PROGMEM = "mario_s.wav";
const char string_49[] PROGMEM = "tlink_s.wav";
const char string_50[] PROGMEM = "dede_s.wav";
const char string_51[] PROGMEM = "luca_s.wav";
const char string_52[] PROGMEM = "bowser_s.wav";
const char string_53[] PROGMEM = "mega_s.wav";
const char string_54[] PROGMEM = "sonic_s.wav";
const char string_55[] PROGMEM = "rosa_s.wav";
const char string_56[] PROGMEM = "mk_s.wav";
const char string_57[] PROGMEM = "shulk_s.wav";
const char string_58[] PROGMEM = "sheik_s.wav";
const char string_59[] PROGMEM = "ike_s.wav";
//Wave 4
const char string_66[] PROGMEM = "robin_s.wav";
const char string_67[] PROGMEM = "lucina_s.wav";
const char string_68[] PROGMEM = "char_s.wav";
const char string_69[] PROGMEM = "wario_s.wav";
const char string_70[] PROGMEM = "pacman_s.wav";
const char string_71[] PROGMEM = "ness_s.wav";

// Then set up a table to refer to your strings.

const char* const string_table[] PROGMEM =
{
string_0,
string_1,
string_2,
string_3,
string_4,
string_5,
string_6,
string_7,
string_8,
string_9,
string_10,
string_11,
string_12,
string_13,
string_14,
string_15,
string_16,
string_17,
string_18,
string_19,
string_20,
string_21,
string_22,
string_23,
string_24,
string_25,
string_26,
string_27,
string_28,
string_29,
string_30,
string_31,
string_32,
string_33,
string_34,
string_35,
string_36,
string_37,
string_38,
string_39,
string_40,
string_41,
string_42,
string_43,
string_44,
string_45,
string_46,
string_47,
string_48,
string_49,
string_50,
string_51,
string_52,
string_53,
string_54,
string_55,
string_56,
string_57,
string_58,
string_59,
string_60,
string_61,
string_62,
string_63,
string_64,
string_65,
string_66,
string_67,
string_68,
string_69,
string_70,
string_71, };

char buffer[71];

#define IRQ 6 // this trace must be cut and rewired!
#define RESET 8

Adafruit_NFCShield_I2C nfc(IRQ, RESET);

SdReader card; // This object holds the information for the card
FatVolume vol; // This holds the information for the partition on the card
FatReader root; // This holds the information for the volumes root directory
FatReader file; // This object represent the WAV file for a pi digit or period
WaveHC wave; // This is the only wave (audio) object, since we will only play one at a time
/*
* Define macro to put error messages in flash memory
*/
#define error(msg) error_P(PSTR(msg))

//Setup()
uint32_t versiondata;

//My Added Variables
uint32_t lastcard = 0;
uint32_t currentcard = 1;
uint32_t CID = 0;
boolean songplaying = false;

//Loop()
uint32_t cardidentifier = 0;
uint8_t success;
uint8_t uid[] = { 0, 0, 0, 0, 0, 0, 0 }; // Buffer to store the returned UID
uint8_t uidLength; // Length of the UID (4 or 7 bytes depending on ISO14443A card type)

//////////////////////////////////// SETUP

void setup() {
// set up Serial library at 9600 bps
Serial.begin(115200);

PgmPrintln("Amiibo Scanner");

if (!card.init()) {
error("Card init. failed!");
}
if (!vol.init(card)) {
error("No partition!");
}
if (!root.openRoot(vol)) {
error("Couldn't open dir");
}

PgmPrintln("Files found:");
root.ls();

// find Adafruit RFID/NFC shield
nfc.begin();

versiondata = nfc.getFirmwareVersion();
if (! versiondata) {
Serial.print(F("Didn't find PN53x board"));
while (1); // halt
}
// Got ok data, print it out!
Serial.print(F("Found chip PN5")); Serial.println((versiondata>>24) & 0xFF, HEX);
Serial.print(F("Firmware ver. ")); Serial.print((versiondata>>16) & 0xFF, DEC);
Serial.print('.'); Serial.println((versiondata>>8) & 0xFF, DEC);

// configure board to read RFID tags
nfc.SAMConfig();

//enable timeout waiting for cards
nfc.setPassiveActivationRetries(50);

}

/////////////////////////////////// LOOP

unsigned digit = 0;

void loop()
{

//Memory Checker

//Serial.print(F("Memory Available = "));
//Serial.println(freeMemory());

// wait for RFID card to show up!
Serial.println(F("Waiting for an Amiibo ..."));
// Wait for an ISO14443A type cards (Mifare, etc.). When one is found
// 'uid' will be populated with the UID, and uidLength will indicate
// if the uid is 4 bytes (Mifare Classic) or 7 bytes (Mifare Ultralight)
success = nfc.readPassiveTargetID(PN532_MIFARE_ISO14443A, uid, &uidLength);

cardidentifier = 0;
CID = 999;
if (success)
{
// Found a card!

Serial.print(F("Amiibo detected #"));
// turn the four byte UID of a mifare classic into a single variable #
cardidentifier = uid[3];
cardidentifier <<= 8; cardidentifier |= uid[2];
cardidentifier <<= 8; cardidentifier |= uid[1];
cardidentifier <<= 8; cardidentifier |= uid[0];
Serial.println(cardidentifier);

//Check the previous card

(lastcard = currentcard);
(currentcard = cardidentifier);

Serial.print(F("Last Amiibo: #"));
Serial.println(lastcard);
Serial.print(F("Current Card:"));
Serial.println(currentcard);

// Check Character ID

// Try to read the Character info page (#21)
uint8_t charID[32];
success = nfc.mifareultralight_ReadPage (21, charID);

if (success)
{
// turn page 21 into a character ID
CID = charID[6];
CID <<= 8; CID |= charID[6];
CID <<= 8; CID |= charID[5];
CID <<= 8; CID |= charID[4];
CID <<= 8; CID |= charID[3];
CID <<= 8; CID |= charID[2];
CID <<= 8; CID |= charID[1];
CID <<= 8; CID |= charID[0];
Serial.println("Character Number: ");
Serial.println(CID);

if (currentcard == lastcard)
{
/*
If there is no song playing, play a song.
*/
if (songplaying == false)
{
//Captain Falcon Song
if (CID == 6)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[30])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Samus Song
if (CID == 49157)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[31])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Little Mac Song
if (CID == 49158)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[32])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Fox Song
if (CID == 32773)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[33])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Wii Fit Song
if (CID == 7)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[34])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Villager Song
if (CID == 32769)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[35])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Marth Song
if (CID == 33)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[36])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Yoshi Song
if (CID == 768)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[37])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Pit Song
if (CID == 16391)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[38])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Kirby Song
if (CID == 31)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[39])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Pikachu Song
if (CID == 6425)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[40])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Link Song
if (CID == 1)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[41])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Luigi Song
if (CID == 256)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[42])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Diddy Song
if (CID == 2304)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[44])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//DK Song
if (CID == 2048)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[45])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Peach Song
if (CID == 512)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[46])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Zelda Song
if (CID == 257)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[47])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Mario Song
if (CID == 0)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[48])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Toonlink Song
if (CID == 65537)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[49])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Dedede Song
if (CID == 543)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[50])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Lucario Song
if (CID == 49178)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[51])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Bowser Song
if (CID == 1280)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[52])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Mega Man Song
if (CID == 32820)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[53])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Sonic Song
if (CID == 50)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[54])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Rosalina Song
if (CID == 66560)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[55])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//MetaKnight Song
if (cardidentifier == 287)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[56])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Shulk Song
if (CID == 16418)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[57])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Sheik Song
if (CID == 65793)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[58])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
//Ike Song
if (CID == 289)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[59])));
playfile(buffer);
if (wave.isplaying) {
songplaying = true;
}
}
}

if(!wave.isplaying)
{
songplaying = false;
}
}
/*
There is no song playing, play the intro sequence!
*/
else
{
//Captain Falcon
if (CID == 6)
{
strcpy_P(buffer, (char*)pgm_read_word(&(string_table[0])));
playcomplete(buffer);
}
//Samus
if (CID == 49157)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[1])));
playcomplete(buffer);
}
//Little Mac
if (CID == 49158)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[2])));
playcomplete(buffer);
}
//Fox
if (CID == 32773)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[3])));
playcomplete(buffer);
}
//Wii Fit
if (CID == 7)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[4])));
playcomplete(buffer);
}
//Villager
if (CID == 32769)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[5])));
playcomplete(buffer);
}
//Marth
if (CID == 33)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[6])));
playcomplete(buffer);
}
//Yoshi
if (CID == 768)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[7])));
playcomplete(buffer);
}
//Pit
if (CID == 16391)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[8])));
playcomplete(buffer);
}
//Kirby
if (CID == 31)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[9])));
playcomplete(buffer);
}
//Pikachu
if (CID == 6425)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[10])));
playcomplete(buffer);
}
//Link
if (CID == 1)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[11])));
playcomplete(buffer);
}
//Luigi
if (CID == 256)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[12])));
playcomplete(buffer);
}
//Diddy Kong
if (CID == 2304)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[14])));
playcomplete(buffer);
}
//DK
if (CID == 2048)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[15])));
playcomplete(buffer);
}
//Peach
if (CID == 512)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[16])));
playcomplete(buffer);
}
//Zelda
if (CID == 257)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[17])));
playcomplete(buffer);
}
//Mario
if (CID == 0)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[18])));
playcomplete(buffer);
}
//Toon Link
if (CID == 65537)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[19])));
playcomplete(buffer);
}
//Dedede
if (CID == 543)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[20])));
playcomplete(buffer);
}
//Lucario
if (CID == 49178)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[21])));
playcomplete(buffer);
}
//Bowser
if (CID == 1280)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[22])));
playcomplete(buffer);
}
//Mega Man
if (CID == 32820)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[23])));
playcomplete(buffer);
}
//Sonic
if (CID == 50)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[24])));
playcomplete(buffer);
}
//Rosalina
if (CID == 66560)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[25])));
playcomplete(buffer);
}
//Meta Knight
if (CID == 287)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[26])));
playcomplete(buffer);
}
//Shulk
if (CID == 16418)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[27])));
playcomplete(buffer);
}
//Sheik
if (CID == 65793)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[28])));
playcomplete(buffer);
}
//Ike
if (CID == 289)
{strcpy_P(buffer, (char*)pgm_read_word(&(string_table[29])));
playcomplete(buffer);
}
}
}
else
{
//if (currentcard == lastcard)
//{
// Serial.println("CID else");
wave.stop();
//}
lastcard = 123456;
currentcard = 654321;
songplaying = false;
}
}

//If the Amiibo is gone, stop the song.
else
{
//if (currentcard == lastcard)
//{
//Serial.println("UID else");
wave.stop();
//}
lastcard = 321123;
currentcard = 123321;
songplaying = false;
}
}

/////////////////////////////////// HELPERS

/*
* print error message and halt
*/
void error_P(const char *str) {
PgmPrint("Error: ");
SerialPrint_P(str);
sdErrorCheck();
while(1);
}
/*
* print error message and halt if SD I/O error
*/
void sdErrorCheck(void) {
if (!card.errorCode()) return;
PgmPrint("\r\nSD I/O error: ");
Serial.print(card.errorCode(), HEX);
PgmPrint(", ");
Serial.println(card.errorData(), HEX);
while(1);
}
/*
* Play a file and wait for it to complete
*/
void playcomplete(char *name) {
playfile(name);
while (wave.isplaying);

// see if an error occurred while playing
sdErrorCheck();
}
/*
* Open and start playing a WAV file
*/
void playfile(char *name) {
if (wave.isplaying) {// already playing something, so stop it!
wave.stop(); // stop it
}
if (!file.open(root, name)) {
PgmPrint("Couldn't open file ");
Serial.print(name);
return;
}
if (!wave.create(file)) {
PgmPrintln("Not a valid WAV");
return;
}
// ok time to play!
wave.play();
}

Next go to File -> Upload to upload the code to your Arduino Uno.

amiibo_stand_arduino_upload

If everything worked your Arduino should now be ready to use.

Prepare SD card:

Next you need to prepare your SD card. (I used a 8GB SD card which I normally use for my Raspberry Pi projects.)

amiibo_stand_sd_card

All you need to do is to format the SD card in FAT32. (You can use SD Card Formatter 4 to do this. You can download this tool from here.)

amiibo_stand_sd_card_properties

Use Audacity to prepare your Sound Files:

Before you can play your Sound Files with your Arduino Wave Shield you need to convert them into .wav files first. To do so do the following:

Open Audacity and open a Sound File (e.g. a mp3 file) you want to convert.

amiibo_stand_audacity_start

Next click on “Split Stereo to Mono” like shown in the picture:

amiibo_stand_audacity_split_to_mono

Next set Project Rate (Hz) to 22050:

amiibo_stand_audacity_hz

Next close one of the tracks (I think they are called tracks) like this:

amiibo_stand_audacity_close

Next go to File -> Export Audio…

amiibo_stand_audacity_export_audio

Make sure to save your file as .wav file.

amiibo_stand_audacity_save_wav

Edit the Metadata of your Sound file if you want to.

amiibo_stand_audacity_edit_metadata

Repeat the above steps for all Sound files you need.

Name your Sound files like this:

  • mario.wav: This file will only play once when the “Mario” Amiibo is placed on the Adafruit NFC/RFID Shield
  • mario_s.wav: This file will play as long as the “Mario” Amiibo remains on the Adafruit NFC/RFID Shield

Your file list should look like this:

amiibo_stand_wav_files

After you have finished converting and naming all your files your Arduino is ready for action.

Now you can play with your finished Amiibo Stand! Many thanks to Modus Pwnin for this awesome project. I had fun building this fun Arduino project and was able to gather some experiences using Arduino.

I hope you liked my post and I hope to see you again next time 🙂

Sources:

http://imgur.com/a/HaJBy

https://www.youtube.com/watch?v=nZ2LU7xCp8U

https://github.com/ModusPwnin/Interactive-Amiibo-Stand

https://learn.adafruit.com/adafruit-wave-shield-audio-shield-for-arduino/convert-files

http://www.reddit.com/r/amiibo/comments/31hsy7/help_me_fill_in_my_list_of_amiibo_character_ids/

http://www.reddit.com/r/amiibo/comments/2rf92p/amiibo_id_spreadsheet/

http://www.sounds-resource.com/other_systems/supersmashbrosfornintendo3ds/

http://www.arduino.cc/

https://www.youtube.com/watch?v=fCxzA9_kg6s

https://code.google.com/p/wavehc/downloads/detail?name=wavehc20110919.zip&can=2&q=

https://learn.adafruit.com/adafruit-wave-shield-audio-shield-for-arduino/wavehc-library

https://github.com/adafruit/Adafruit_NFCShield_I2C

http://stackoverflow.com/questions/26215669/windows-7-does-not-see-arduino-uno-r3-board-in-its-device-manager

https://learn.adafruit.com/adafruit-wave-shield-audio-shield-for-arduino/examples

Tagged

Boost your Wifi range with a DIY Cantenna

Hello everyone, today I want to show you how you can build yourself a Cantenna to boost the Wifi range of your computer.

Here are the things you will need:

  • A can
  • A N-Female chassis mount connector
  • A “pigtail” cable
  • A piece of thick wire you need to solder onto your N-Female chassis mount connector with a soldering iron
  • A wireless LAN adapter (Important: You will need one with an detachable antenna)
  • A piece of sandpaper (optional)

After you have gathered all materials you need you can start building your Cantenna.

Here is a picture of the can I used for my Cantenna:

cantenna_beer_can

The can I used has a diameter of 85mm and is about 18cm tall making it the perfect material for my Cantenna.

To calculate the necessary dimensions of your Cantenna you can use this online calculator here.

Here is a screenshot of the necessary dimensions for my can:

cantenna_calculations

So for example:

My can has a diameter of 85mm and is 180mm tall so I need to do the following:

  • I need to cut off the top of my can and I need to make sure that my can is still taller than 174.18mm afterwards
  • I need to drill a hole about 58.06mm above the bottom of my can for my N-Female chassis mount connector
  • I need to solder a piece of thick wire onto the pin of my N-Female chassis mount connector which is about 30.6mm in length

Here you can see a screenshot how I placed my N-Female chassis mount connector on my can:

cantenna_N_female_connector

Here is how I did this:

  • First I used some sandpaper to get of some of the cans paint
  • Next I drilled a hole about 58.06mm above the bottom of the can
  • Next I soldered the piece of thick wire with a length of about 30.6mm length onto the N-Female chassis mount connector
  • Then I drilled some more holes to mount my N-Female chassis mount connector onto the can

And here you can see the piece of thick wire inside my can pointing towards its center:

cantenna_inside_of_can

Now attach your “pigtail” cable to your N-Female chassis mount connector.

The cable should look like this:

cantenna_pigtail_cable

Then attach your wireless LAN adapter to the other end of your “pigtail” cable.

I used this one here: (I bought this one here.)

cantenna_wifi_adapter

And here is the finished Cantenna:

cantenna_finished

As you can see I added a plastic lid (don´t use one made out of metal!) to the top and painted it gray. You don´t need to do that. I just thought this would look better.

Well, that´s it. You now have a Cantenna which will allow you to connect to your Wireless networks from bigger distances. I hope you liked my post and I hope to see you again next time 🙂

Sources:

http://www.changpuak.ch/electronics/cantenna.php

http://www.turnpoint.net/wireless/cantennahowto.html

https://www.youtube.com/watch?v=NVjN9EK7B0E

Tagged

Turn SIM card into Micro SIM

Hello everyone, today I want to share a funny little Story with you. A few days ago my mother forgot her mobile phone in her pants and well, you guessed right, she put them into the washing machine. The mobile phone did not survive this and she had to buy a new one. But there was a problem with her new mobile phone: A normal SIM would not fit into it. (My mother still had a normal SIM card since her mobile phone was already quite old) I had to find a solution since my mother really needed her mobile phone and since it would be useless if nobody could call her, I tried my best to get it working.

I googled a bit and found out that you can turn a normal SIM card into a Micro SIM card simply by cutting it into the right shape. (A bit of metal was cut off when I did this but it looks like it had no impact on its functionality.)

Ok so here is what I did to turn my mothers SIM card into a Micro SIM card:

You need the following 2 things to do this:

  • A pair of sharp scissors
  • A Micro SIM card template which you can find here (german). (If the link does not work you can download it from here too.)

Here is the SIM card before the cutting process:

sim

Now print the Micro SIM template.

Important: Make sure to set the Scale to 100%.

micro_sim_template

Now put the template onto your SIM card (use some duct tape if necessary) and cut it into the right shape.

Here is the SIM card after the cutting process:

micro_sim

Sorry for the bad picture quality. As you can see the shape is not perfect but it works.

Well and this solved the problem. The now Micro SIM card fit almost perfectly into my mothers new mobile phone and worked as expected.

I hope you liked this little slice of life story post and I hope to see you again next time 🙂

Sources:

http://www.computerbild.de/downloads/4508371/Micro_SIM.pdf (german)

https://www.youtube.com/watch?v=r5NCmuyKoqQ (german)

Tagged

Raspberry Pi 2 – Windows 10 IOT Installation

Hello everyone, today I came across a great post on reddit which explains how to install Windows 10 IOT on your Raspberry Pi 2 in the most simple way I have seen so far. And I will show you how you can install the current Windows 10 IOT Build so you can lay your hands on this new topic as soon as possible 🙂

To download the new Windows 10 IOT you first need a Microsoft Account. Then click on this link to sign up on Microsoft Connect.

After you have successfully signed up for Microsoft Connect download the file “Windows_IoT_Core_RPI2_BUILD.zip“.

Now if you don´t have the Windows 10 Insider Preview Operating System installed on your computer or on a virtual machine, don´t worry: You don´t need it. The only thing yo need is a 7zip file called “DISM10074.7z” which you can download from here. (You can find the original post where this file comes from in this reddit thread here.)

Important: Don´t forget to unblock the “DISM10074.7z” file before you unzip it.

windows10iot_DISM10074_unblock

Next unzip the above zip files. In “Windows_IoT_Core_RPI2_BUILD” you will find the file “Flash.ffu“. Place this file into the “DISM10074” directory you extracted from the second zip file.

windows10iot_DISM10074

Next run PowerShell as Administrator and use the command “cd” to change into your “DISM10074” directory.

Now insert your Micro SD Card (at least 8GB) and start diskpart with the below command.

diskpart

Now find out the Disk number of your Micro SD card by using the below command:

list disk

Write down the Disk number of your Micro SD Card and exit diskpart.

exit

Now for the last step. Run the below command to write the Windows 10 IOT image to your Micro SD card:

Important: Replace the X of PhysicalDriveX with the number of your Disk before you run the below command.

.\dism.exe /Apply-Image /ImageFile:flash.ffu /ApplyDrive:\\.\PhysicalDriveX /SkipPlatformCheck

Wait for the command to complete. If it says “The operation completed successfully” everything went as expected.

Now you can close the PowerShell window and safely remove your Micro SD card and you are ready to use Windows 10 IOT.

Insert your Micro SD card into your Raspberry Pi 2 and plug in all necessary cables. Please keep in mind that the first boot will take some time so please be patient and don´t turn off your Raspberry Pi 2.

Well, that´s it. You can now start to explore Windows 10 IOT. Have fun!

I hope my post was interesting for you and I hope to see you again next time 🙂

Sources:

http://www.reddit.com/r/raspberry_pi/comments/34cad5/windows_10_iot_core_raspberry_pi_2_preview_live/

https://ms-iot.github.io/content/win10/SetupRPI.htm

https://www.raspberrypi.org/forums/viewtopic.php?f=56&t=98395

http://www.engadget.com/2015/04/30/windows-10-preview-raspberry-pi-2/

https://mariofraiss.wordpress.com/2015/05/02/setup-your-rasperry-pi-with-windows-10-iot-in-a-hyper-v-or-physical-environment/

Tagged ,