element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs My First Try Using The MagiQuest Wand With An Arduino
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Former Member
  • Date Created: 7 Feb 2015 3:49 AM Date Created
  • Views 1487 views
  • Likes 0 likes
  • Comments 3 comments
  • magiquest
  • arduino
  • wand
  • relay
Related
Recommended

My First Try Using The MagiQuest Wand With An Arduino

Former Member
Former Member
7 Feb 2015

So I have been looking around online for ways to use the MagiQuest wand at home, but have found very few solutions. I decided to make my own. Using the Arduino IR library I got some raw values from the wand using a old IR sensor from a VCR and then took those values and converted them from decimal to hex value using an online calculator. I just googled it and found one. Then made up some code that detected when a certain IR code was detected to activate my relay board and turn some lights off and on. My hook up is the IR sensor is on a breadboard connected to the Arduino, then I have jumper cabled hooked into a IDE cable because I only have male to male jumpers, then the IDE cable hooks into the relay board activating the relays. Right now I have 3 wands that the Arduino can interact with I can add more though.

image

#include <IRremote.h>

int RECV_PIN = 3; //

int led1 = 5;

int led2 = 6;

int led3 = 9;

int itsONled[] = {0,0,0,0};

#define code1  //Place your IR codes here

#define code2

#define code3

 

IRrecv irrecv(RECV_PIN);

 

decode_results results;

 

void setup()

{

  Serial.begin(9600);

  irrecv.enableIRIn();

  pinMode(led1, OUTPUT);

  pinMode(led3, OUTPUT); 

}

 

void loop() {

  if (irrecv.decode(&results)) {

    unsigned int value = results.value;

    switch(value) {

       case code1:

         if(itsONled[1] == 1) {     

            digitalWrite(led1, LOW); 

            itsONled[1] = 0;         

         } else {                    

             digitalWrite(led1, HIGH);

             itsONled[1] = 1;       

         }

          break;

       case code2:

         if(itsONled[2] == 1) {

            digitalWrite(led2, LOW);

            itsONled[2] = 0;

         } else {

             digitalWrite(led2, HIGH);

             itsONled[2] = 1;

         }

          break;

       case code3:

         if(itsONled[3] == 1) {

            digitalWrite(led3, LOW);

            itsONled[3] = 0;

         } else {

             digitalWrite(led3, HIGH);

             itsONled[3] = 1;

         }

          break;        

    }

    Serial.println(value);

    irrecv.resume();

  }

}

  • Sign in to reply
  • Former Member
    Former Member over 8 years ago

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

    I had to cut some parts where the Arduino wouldn't respond. A lot of signals get sent. Sometimes it receives and decodes the wrong one.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Former Member
    Former Member over 8 years ago in reply to mpflaga

    That sounds cool! I was actually thinking about trying to make some home appliances interconnected and activating them with a swoosh of my wand.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mpflaga
    mpflaga over 8 years ago

    Congratulations. My family has been enjoying MagiQuest and the wands for years. My son had an amazing look of joy on his face one day when I told him that I had captured the magic and brought it home. Since non-hackers must leave the magic at Great Wolfe Lodge. Noting that you can often pickup additional wands on eBay. And of course the baby girl had to get a pink wand.

     

    To help in this venture I had successfully decoded the wands format into a fork of mpflaga/Arduino-IRremote as to uniquely identify each wands serial number and magnitude of swish (along with adding 2.5ch Helicopters, another project) and implement them into Arduino UNO's and Digispark's (ATtiny85) to create a Dueling MagiQuest Wand Game for Detroit's Maker Fair.

     

    Have Fun, hacking...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube