Wiimote controlled robot

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

Wiimote controlled robot

Postby maocide » Sat Feb 13, 2010 5:54 pm

Hi,
I just finished developing a wiimote controlled robot.
The wiimote can be used as a steering wheel to make the robot turn analogically. Buttons are used to make the robot go forward and backward.
I used wiimotej to get input from the wiimote and both the wiimote and the robot are connected via bluetooth to the pc.

Video http://www.youtube.com/watch?v=NyUmUoHP_KU
maocide
New User
 
Posts: 2
Joined: Sat Feb 13, 2010 5:45 pm

Postby Rockmaninoff » Thu Feb 18, 2010 9:05 pm

Hi maocide,

First of all, excellent video; that seems like an awesome project! Any idea where you'll take it from here?

Would you mind posting your code or a description of how you made this work (different classes you used, etc.)? I'm thinking of doing something similar with either a Sixaxis controller or iPod Touch.

Thanks.
Rockmaninoff
New User
 
Posts: 6
Joined: Thu Feb 18, 2010 5:02 pm

Postby pjpvt » Fri Feb 19, 2010 2:02 pm

Could you give some details about the bluetooth hardware you are using and your OS?

Last year, a class team I participated in was unable to get a bluetooth setup that would communicate with both the wiimote and the NXT from the same system. We determined that the Windows stack could talk to the NXT, but not the wiimote while the widcomm stack would work with the wiimote, but not the NXT. Our workaround was sending the communications from one PC talking to the wiimote to another PC talking to the NXT via TCP/IP.

I would like to get one PC as the communications hub between wiimote and NXT if possible, even if it means using multiple bluetooth devices.

Thanks for any details.
pjpvt
New User
 
Posts: 1
Joined: Fri Feb 19, 2010 1:53 pm

Postby Rockmaninoff » Fri Feb 19, 2010 3:03 pm

I'm using Windows 7 with the standard Bluecove library. Currently we're just trying to get a USB Xbox (original) controller controlling our robot. The controller connects to my laptop using USB and then my computer transfers commands to the NXT via Bluetooth. This is a minor project, and once the due date has passed (about two weeks from now), we'll be working on directly controlling via Wiimote/Sixaxis/iPod Touch. We might also look into control via Windows Mobile.
Rockmaninoff
New User
 
Posts: 6
Joined: Thu Feb 18, 2010 5:02 pm

Postby maocide » Fri Feb 19, 2010 3:32 pm

Hi, thank you for your interest in this project.
The code is a bit messy right now, I'll try to post it soon.
Now I changed the code to make the robot work in two different ways. A free drive mode let the user control the robot like in the video, another way to control it is with the dpad. With the dpad the robot moves using SimpleNavigator class. Computed coordinates, angle and data from sonic sensor are sent to the pc that draws the robot position and the positions of detected obstacles in a JPanel.
I made this to draw a map of the robot's surroundings, unfortunately this is not very precise yet.
I think it would be fun also to make the robot controllable with a joystick, but I don't know if there is joystick class for java that is not os dependent.
Any suggestion is welcome.

About the os and the device used.
I'm using linux debian with bluez stack and wiiusej for the wiimote. libbluetooth-dev has to be installed and wiiuse.so has to be in java library path. The bluetooth device is a linksys bluetooth usb adapter.
I had troubles with windows too, both bluesoleil and windows stack did not find my NXT.

Mario
maocide
New User
 
Posts: 2
Joined: Sat Feb 13, 2010 5:45 pm


Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 0 guests

cron
more stuff