
As you're probably well aware, the Come stai probabilmente ben sa, la wiimote Wiimote and e nunchuck Nunchuck have a vast array of sensors built into them. Disponiamo di una vasta gamma di sensori integrati in esse. 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 ( Invece di acquistare pre-assemblate breakout bordo di $ 35, o il tentativo di saldare una piccola superficie di montaggio accelerometro, imparare a sfruttare le caratteristiche del Wii e Nunchuck hanno completamente assemblato accelerometro, joystick e pulsanti per soli € 12,50 spediti ( on ebay su 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. Perché utilizzare il Nunchuck INSEAD di effettivo Wiimote? Wiimotes può essere di circa $ 40 e hanno un sacco di funzioni extra che si solito bisogno in questo momento. Plus, the nunchuck has a cable which can easily be plugged into the Arduino. Inoltre, il Nunchuck è un cavo che può essere facilmente collegato alla Arduino. Of course, there are plenty of other ways to Naturalmente, ci sono molti altri modi per connect the wiimote to your pc collegare il Wiimote al vostro pc but this way we can interact with other hardware using the Arduino. ma in questo modo possiamo interagire con gli altri hardware utilizzando il Arduino. If you've never used the Arduino, see Se non hai mai usato la Arduino, vedere our tutorial la nostra guida . .
1. 1. Connect the Nunchuck to your Computer Collegare il Nunchuck al tuo computer

The Nunchuck communicates through 6 bits of data. Il Nunchuck comunica con 6 bit di dati. To read this data, you'll need to connect the wiimote to a microcontroller. Per leggere questi dati, sarà necessario collegare il Wiimote ad un microcontrollore. In this case we'll use In questo caso useremo the Arduino Arduino . . You can either cut the cord on your Nunchuck or purchase an adapter so it fits snugly into your Arduino programmer board. Si può tagliare il cordone sul Nunchuck o acquistare un adattatore in modo che si adatta perfettamente al vostro programmatore Arduino bordo. View more detailed Visualizza più dettagliate instructions istruzioni about connecting the nunchuck and I2C (how they talk to each other). sulla connessione del Nunchuck e I2C (come si parla ad ogni altro).
2. 2. Setup the Software and Download Code Il programma di installazione del software e download Codice

If you don't already have it, download the Se non si dispone già di esso, scarica il Arduino software Arduino software (free). (iscrizione gratuita). Next, download the Successivamente, scarica il code codice which deciphers the 6 bits of data send from the Nunchuck and prints it to your computer's serial port. che decifra i 6 bit di dati da inviare il Nunchuck e stampe al tuo porta seriale del computer. To learn more about how this communication works, see the Per saperne di più su come funziona la presente comunicazione, si veda la author's tutorials autore del tutorial or the o la original source fonte originale . .
3. 3. Resulting Output Conseguente uscita

By using the serial monitor of your Arudino software (or other serial monitoring software), you'll see the above output. Utilizzando la porta seriale del vostro monitor Arudino software (o di altri software di monitoraggio di serie), viene visualizzato il risultato di cui sopra. Sure, view the results as numbers is fine, but visually representing data in real time is far sexier. Certo, vedere i risultati come numeri è bene, ma che rappresenta visivamente i dati in tempo reale è molto sexy. Using a program called Usando un programma chiamato Processing Elaborazione , you can read the above data and display it like the image below. , È possibile leggere i dati di cui sopra e di visualizzazione come l'immagine qui sotto. See our thorough tutorial about how to graphically visualize data. Vedi la nostra esauriente tutorial su come visualizzare graficamente i dati.
4. 4. Visualizing Data in Real Time La visualizzazione dei dati in tempo reale

Watching numbers steam in (step 3 image) is fine and dandy, but sometimes you just need something more to create a truly new perspective. Guardare i numeri in vapore (fase 3 immagine) è raffinato e elegante, ma a volte basta qualcosa di più per creare una vera e propria nuova prospettiva. Processing Elaborazione is the program I've used, it's pretty easy to è il programma che ho usato, è abbastanza facile learn apprendere , uses the same interface as Arduino, and can render 2D and 3D visualizations with small amounts of code. , Utilizza la stessa interfaccia di Arduino, e può rendere la visualizzazione 2D e 3D, con piccole quantità di codice. Check out our tutorial to learn how to Check out nostro tutorial per imparare a graphically visualize data visualizzare graficamente i dati . .
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 Ora che hai imparato a leggere i dati da un Nunchuck come pure i dati di visualizzazione, vai fare qualcosa di terribile e non dimenticate di subscribe to HacknMod Iscriviti a HacknMod for more fantastic posts. per maggiori posti fantastici.










































