Pages: [1]   Go Down
Author Topic: Wii nunchuck mouse  (Read 1271 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 250
Arduino is the brain of the robot.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey! I was lookin on the web for some stuff. And i found this. and i was wondering if there was a way to do this with arduino! Lets see, please helpp.
You rock....
Logged

Grenoble/Lyon - France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 363
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you can run AVRUSB on the arduino, yes, but it's not the case yet.
Or you can program a proxy running on the computer, in a language that can emulate a mouse or any HID devices.
Logged


London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can get this functionality by sending the nunchuck data to the pc over the serial port and having a program on the PC control the mouse cursor.

There are a few articles on how to send nunchuck data to a pc, this one uses processing to receive the data:
http://www.arduino.cc/playground/Main/WiiChuckClass
Instead of displaying the position in Processing, you would need to use the java api to inject mouse events, see: http://java.sun.com/j2se/1.3/docs/api/java/awt/Robot.html

If you prefer to use a windows programming language, the low level windows API function to insert keyboard and mouse events into the input stream is called SendInput:
http://msdn.microsoft.com/en-us/library/ms646310(VS.85).aspx
Logged

New Zealand
Offline Offline
God Member
*****
Karma: 0
Posts: 999
Arduino pebbles
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If you can run AVRUSB on the arduino, yes, but it's not the case yet.
I couldn't quite parse that, did you mean you thought it wasn't currently possible to run AVRUSB on the Arduino, or that it's not currently possible to implement the Wii nunchuck mouse on the Arduino?

Either way, the original poster might want to look at the August 19th 2008 entry in the Arduino/AVRUSB project log where I link to a contributed USB mouse implementation.

I know at least one person on IRC is working on some Wii controller Arduino USB integration.

--Phil.
Logged

Grenoble/Lyon - France
Offline Offline
Sr. Member
****
Karma: 0
Posts: 363
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh, sorry follower, I didn't know you succeeded in the mouse stuff, I thought you only had the keyboard working.
Nice ^^
Logged


New Zealand
Offline Offline
God Member
*****
Karma: 0
Posts: 999
Arduino pebbles
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I didn't know you succeeded in the mouse stuff
Even better I didn't have anything to do with it--it was a patch to my code submitted by someone else completely unknown to me. :-)

--Phil.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 50
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

check it our here: www.hardikpandya.com
Logged

Urbana, USA
Offline Offline
Newbie
*
Karma: 2
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the mouse function from wii nunchuck working quite smoothly using the Java robot class. Also I have the same thing working for a wider range of OSs and softwares using a USB to PS2 converter and sending PS2 messages.

more details at my blog here:
http://www.siliconrepublic.blogspot.com/
Logged

Pages: [1]   Go Up
Jump to: