
As you're probably well aware, the وربما كنت تدرك جيدا ، و wiimote wiimote and و nunchuck nunchuck have a vast array of sensors built into them. لديها مجموعة واسعة من أجهزة الاستشعار في صلب لهم. Instead of buying pre-assembled breakout board for $35, or attempting to solder a tiny surface mount accelerometer, learn to exploit the features of the Wii Nunchuck and have a fully assembled accelerometer, joystick, and pushbuttons for just $12.50 shipped ( بدلا من شراء ما قبل اندلاع متن تجميعها ل35 دولارا ، أو محاولة لحام صغيرة على سطح جبل التسارع ، وتعلم لاستغلال ميزات Nunchuck وى ويكون التسارع تجميعها بالكامل ، ذراع التحكم ، والأزرار فقط 12.50 دولارا للشحن ( on ebay على موقع ئي باي ). ).

Why use the nunchuck insead of the actual WiiMote? Wiimotes can be about $40 and have a lot of extra features you wont need at the moment. لماذا استخدام إنسياد nunchuck من WiiMote الفعلية؟ Wiimotes يمكن أن يكون حوالي 40 دولارا ، ولدي الكثير من ميزات اضافية عندئذ فإنك لن تحتاج في هذه اللحظة. Plus, the nunchuck has a cable which can easily be plugged into the Arduino. زائد ، وnunchuck قد كبل التي يمكن بسهولة أن تسد في اردوينو. Of course, there are plenty of other ways to بالطبع ، هناك الكثير من الطرق الأخرى ل connect the wiimote to your pc wiimote لتوصيل جهاز الكمبيوتر الخاص بك but this way we can interact with other hardware using the Arduino. ولكن بهذه الطريقة يمكننا أن تتفاعل مع غيرها من الأجهزة باستخدام اردوينو. If you've never used the Arduino, see إذا كنت لم تستخدم اردوينو ، انظر our tutorial برنامجنا التعليمي . .
1. 1. Connect the Nunchuck to your Computer Nunchuck لتوصيل جهاز الكمبيوتر الخاص بك

The Nunchuck communicates through 6 bits of data. ويتصل Nunchuck خلال 6 بت من البيانات. To read this data, you'll need to connect the wiimote to a microcontroller. لقراءة هذه البيانات ، ستحتاج لتوصيل wiimote لمتحكم دقيق. In this case we'll use في هذه الحالة سنستخدم the Arduino واردوينو . . You can either cut the cord on your Nunchuck or purchase an adapter so it fits snugly into your Arduino programmer board. يمكنك إما قطع الحبل على Nunchuck أو شراء محول بحيث يلائم بشكل مريح إلى حسابك اردوينو متن مبرمج. View more detailed عرض أكثر تفصيلا instructions تعليمات about connecting the nunchuck and I2C (how they talk to each other). عن ربط nunchuck وI2C (كيف يتحدثون مع بعضهم البعض).
2. 2. Setup the Software and Download Code الإعداد للبرامج وتحميل المدونة

If you don't already have it, download the إذا لم يكن لديها بالفعل ، تحميل Arduino software اردوينو البرمجيات (free). (الحرة). Next, download the المقبل ، تحميل code رمز which deciphers the 6 bits of data send from the Nunchuck and prints it to your computer's serial port. التي deciphers البتات 6 من إرسال البيانات من Nunchuck ويطبع على الكمبيوتر المنفذ التسلسلي. To learn more about how this communication works, see the لمعرفة المزيد عن كيف يعمل هذا الاتصال ، راجع author's tutorials البلاغ الدروس or the أو original source المصدر الأصلي . .
3. 3. Resulting Output المخرجات الناتجة

By using the serial monitor of your Arudino software (or other serial monitoring software), you'll see the above output. باستخدام جهاز العرض التسلسلي لبرامجك Arudino (أو غيرها من المسلسل رصد البرمجيات) ، سترى الإخراج أعلاه. Sure, view the results as numbers is fine, but visually representing data in real time is far sexier. بالتأكيد ، عرض النتائج والأرقام على ما يرام ، ولكن بصريا تمثيل البيانات في الوقت الحقيقي هو الآن أكثر جنسية. Using a program called باستخدام برنامج يسمى Processing تجهيز , you can read the above data and display it like the image below. ، يمكنك قراءة البيانات المذكورة أعلاه ، وعرضه مثل الصورة أدناه. See our thorough tutorial about how to graphically visualize data. نرى تعليمي شامل حول كيفية تصور رسوميا البيانات.
4. 4. Visualizing Data in Real Time تصور البيانات في الوقت الحقيقي

Watching numbers steam in (step 3 image) is fine and dandy, but sometimes you just need something more to create a truly new perspective. مشاهدة أعداد البخار في (الخطوة 3 صورة) على ما يرام ومدهش ، ولكن في بعض الأحيان أنت فقط تحتاج إلى شيء أكثر لتكوين منظور جديد حقا. Processing تجهيز is the program I've used, it's pretty easy to هو البرنامج لقد استعملت ، فإنه من السهل جدا learn يتعلم , uses the same interface as Arduino, and can render 2D and 3D visualizations with small amounts of code. ويستخدم واجهة نفس اردوينو ، ويمكن أن تجعل 2D و 3D أميبا مع كميات صغيرة من التعليمات البرمجية. Check out our tutorial to learn how to تحقق من البرنامج التعليمي لمعرفة كيفية graphically visualize data رسوميا تصور البيانات . .
Now that you've learned how to read data from a nunchuck as well as data visualization, go make something awesome and don't forget to الآن بعد أن تعلمت كيفية قراءة البيانات من nunchuck فضلا عن بيانات والتصور ، وتذهب وتقديم شيء رائع لا ينسى ل subscribe to HacknMod الاشتراك في HacknMod for more fantastic posts. لمزيد من الوظائف رائعة.











































