Is there a way to read and report Wii Nunchuk accelerometer data back to a PC with a boarduino? This uses the FTDI cable and I wasn't sure if this was possible or how to set it up...
anu ideas?
thanks
reporting Wii Nunchuk data with boarduino?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88089
- Joined: Sat Feb 07, 2009 10:11 am
Re: reporting Wii Nunchuk data with boarduino?
There are plenty of examples of interfacing the nunchuck to an Arduino. The Boarduio is the same - just the pins are arranged differently.
Check out the Arduino playground on www.Arduino.cc
And this linkhas a lot of good detail.
Once you collect the data, just print it to the serial port to send it back to the PC.
Check out the Arduino playground on www.Arduino.cc
And this linkhas a lot of good detail.
Once you collect the data, just print it to the serial port to send it back to the PC.
-
- Posts: 27
- Joined: Mon Nov 26, 2007 4:36 pm
Re: reporting Wii Nunchuk data with boarduino?
I tried the code on the link and am getting the following error and not sure why...
'beginSerial' not declared in this scope
Code: Select all
#include <Wire.h>
#include <string.h>
#undef int
#include <stdio.h>
uint8_t outbuf[6]; // array to store arduino output
int cnt = 0;
int ledPin = 13;
void
setup ()
{
beginSerial (19200);
Serial.print ("Finished setup\n");
Wire.begin (); // join i2c bus with address 0x52
nunchuck_init (); // send the initilization handshake
}
-
- Posts: 86
- Joined: Sun Mar 08, 2009 12:53 pm
Re: reporting Wii Nunchuk data with boarduino?
Serial.begin(19200);Japper wrote:I tried the code on the link and am getting the following error and not sure why...
[/code]'beginSerial' not declared in this scope
-
- Posts: 27
- Joined: Mon Nov 26, 2007 4:36 pm
Re: reporting Wii Nunchuk data with boarduino?
I didn't see that typo on the page when I copied it.
Thanks for pointing that out!
Thanks for pointing that out!
-
- Posts: 27
- Joined: Mon Nov 26, 2007 4:36 pm
Re: reporting Wii Nunchuk data with boarduino?
Once I downloaded the FTDI chip set drivers I was able to upload the compiled
code into the arduino. At that point, when I connected the arduino to the USB on my laptop, it showed up as a virtual serial device in my windows device manager.
If I power the arduino from an external ac wall supply, and connect it to the USB, it becones an unknown device and the com port disappears.
Any ideas why that might be?
thanks
code into the arduino. At that point, when I connected the arduino to the USB on my laptop, it showed up as a virtual serial device in my windows device manager.
If I power the arduino from an external ac wall supply, and connect it to the USB, it becones an unknown device and the com port disappears.
Any ideas why that might be?
thanks
- adafruit_support_bill
- Posts: 88089
- Joined: Sat Feb 07, 2009 10:11 am
Re: reporting Wii Nunchuk data with boarduino?
Do you have the PWR SEL jumper set to "usb" or "ext"?
-
- Posts: 27
- Joined: Mon Nov 26, 2007 4:36 pm
Re: reporting Wii Nunchuk data with boarduino?
When I am powering the unit with USB and don't have the power brick attached,the PWR SEL jumper set to "usb" and when I am powering the arduino with the power brick and still connected to the USB, I set the PWR SEL jumper set to "ext".
In the PWR SEL "ext" jumper position, the USB is not recognized.
I am only using the USB for diagnostic purposes and the arduino will be powered by an external 12v battery with no USB connection.
By the way, I did measure the voltage on the arduino with both jumper settings and the +5v line measured +5v in both jumper settings...
In the PWR SEL "ext" jumper position, the USB is not recognized.
I am only using the USB for diagnostic purposes and the arduino will be powered by an external 12v battery with no USB connection.
By the way, I did measure the voltage on the arduino with both jumper settings and the +5v line measured +5v in both jumper settings...
-
- Posts: 27
- Joined: Mon Nov 26, 2007 4:36 pm
Re: reporting Wii Nunchuk data with boarduino?
I noticed the other day that Walmart has a generic 3rd party Wii nunchuk for ~ $12 which is pretty cheap considering the accelerometer chip inside would cost $30 by itself and for a measly $12 you get it mounted in an ergonomic case...
- adafruit_support_bill
- Posts: 88089
- Joined: Sat Feb 07, 2009 10:11 am
Re: reporting Wii Nunchuk data with boarduino?
We have them in the store here too: http://www.adafruit.com/products/342
Please be positive and constructive with your questions and comments.