
How to: Cheap Accelerometer with the Wii Nunchuck How to: Goedkope Accelerometer met de Wii Nunchuck

As you're probably well aware, the Zoals u waarschijnlijk weet, de wiimote Wiimote and en nunchuck Nunchuck have a vast array of sensors built into them. hebben een enorme serie van sensoren ingebouwd in hen. 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 ( In plaats van vooraf geassembleerde breakout board voor $ 35, of de poging tot een klein Surface Mount versnellingsmeter solderen, leren de functies van de Wii Nunchuck te benutten en een volledig geassembleerd versnellingsmeter, joystick hebben, en drukknoppen voor slechts 12,50 dollar verzonden ( on ebay op 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. Waarom de nunchuck INSEAD van de werkelijke WiiMote? Wiimotes kan worden ongeveer $ 40 en hebben veel extra functies die je gewoon nodig op dit moment. Plus, the nunchuck has a cable which can easily be plugged into the Arduino. Plus, de nunchuck heeft een kabel die gemakkelijk kan worden aangesloten op de Arduino. Of course, there are plenty of other ways to Natuurlijk, er zijn genoeg andere manieren om connect the wiimote to your pc Sluit de Wiimote op uw pc but this way we can interact with other hardware using the Arduino. maar op deze manier kunnen we samenwerken met andere hardware met behulp van de Arduino. If you've never used the Arduino, see Als je nog nooit hebt de Arduino, gebruikt zie our tutorial onze handleiding . .
1. 1. Connect the Nunchuck to your Computer Sluit de Nunchuck op uw computer

The Nunchuck communicates through 6 bits of data. De Nunchuck communiceert door middel van 6 bits van de gegevens. To read this data, you'll need to connect the wiimote to a microcontroller. Deze gegevens te lezen, moet je de Wiimote te sluiten op een microcontroller. In this case we'll use In dit geval gebruiken we the Arduino de Arduino . . You can either cut the cord on your Nunchuck or purchase an adapter so it fits snugly into your Arduino programmer board. U kunt knippen het snoer op uw Nunchuck of de aankoop van een adapter zodat het past precies in je Arduino programmeur boord. View more detailed Bekijk meer gedetailleerde instructions instructies about connecting the nunchuck and I2C (how they talk to each other). over het aansluiten van de Nunchuck en I2C (hoe ze met elkaar praten).
2. 2. Setup the Software and Download Code Stel de Software en Download Code

If you don't already have it, download the Als u nog niet hebt, download de Arduino software Arduino software (free). (gratis). Next, download the Vervolgens download de code code which deciphers the 6 bits of data send from the Nunchuck and prints it to your computer's serial port. die de 6 bits van de gegevens ontcijfert versturen van de Nunchuck en drukt het op de seriële poort van uw computer. To learn more about how this communication works, see the Voor meer informatie over hoe deze communicatie werkt, zie de author's tutorials auteur tutorials or the of original source oorspronkelijke bron . .
3. 3. Resulting Output Resulterende output

By using the serial monitor of your Arudino software (or other serial monitoring software), you'll see the above output. Door het gebruik van de seriële monitor van uw Arudino software (of ander serienummer monitoring software) zie je de bovenstaande output. Sure, view the results as numbers is fine, but visually representing data in real time is far sexier. Tuurlijk, de resultaten als nummers mening is prima, maar visueel die gegevens in real-time is veel sexier. Using a program called Met behulp van een programma genaamd Processing Verwerking , you can read the above data and display it like the image below. Kunt u lezen van de bovenstaande gegevens en weer te geven zoals de afbeelding hieronder. See our thorough tutorial about how to graphically visualize data. Zie onze grondige tutorial over hoe de gegevens grafisch te visualiseren.
4. 4. Visualizing Data in Real Time Het visualiseren van gegevens 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. Kijken nummers stoom in (stap 3 afbeelding) is prima en aardig, maar soms heb je gewoon iets meer nodig om een echt nieuw perspectief te creëren. Processing Verwerking is the program I've used, it's pretty easy to is het programma dat ik heb gebruikt, is het vrij gemakkelijk te learn leren , uses the same interface as Arduino, and can render 2D and 3D visualizations with small amounts of code. , Gebruikt dezelfde interface als Arduino, en kan maken 2D en 3D visualisaties met kleine hoeveelheden van de code. Check out our tutorial to learn how to Bekijk onze tutorial om te leren graphically visualize data grafisch visualiseren . .
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 Nu je hebt geleerd hoe het lezen van gegevens uit een nunchuck alsmede gegevens visualisatie, ga iets maken ontzagwekkend en vergeet niet om subscribe to HacknMod abonneren op HacknMod for more fantastic posts. voor meer fantastische posten.










































