|
|
Using Wii Buttons
Last post Tue, Apr 22 2008 4:19 PM by Eddy. 8 replies.
-
-
-
Eddy


- Joined on Wed, Mar 5 2008
- Posts 4
|
Just to confirm its not my computer, Ive installed XP onto another laptop, an IBM T22 700mhz & 256ram. SP2 + all updates except for IE7, I like IE6.
Ive installed MSRS Refresh, C# Express & Registered again. This installed .NET 3.5
Im using a Belkin Bluetooth adapter F8T012 with its original drivers (latest from Belkin)
The Bluetooth sees the Wiimote, but when trying to run anything I get error HID not in list.
So I found this http://wiibrew.org/index.php?title=List_of_Working_Bluetooth_Devices which provided a link to an upgrade, now the Wiimote seems to be OK.
I can use the Wiimote just fine when running Alberto Bietti's sample (Thanks Alberto!!) http://alandtech.blogspot.com/2007/11/lego-nxt-wiimote-with-msrs-tutorial.html
but when trying to get button pushes I fail to get it right.
Again, Im using Microsofts VPL for my programming just because I cant code.
I can duplicate the MSRS Robotics Tutorial 4 (VPL) - Drive By Wire, but instead of using a motor, I use the Wiimote icon, I can reliably control the LEDs and Rumble by pressing the controls on the 'Direction Dialogue'
But when I try to get button states, the computer doesnt like it.
Ill start by dragging the Wiimote icon out, then connecting a 'Calculate' block to either output, Ill select ButtonState.A then to an IF block then back to the Wiimote to turn on an LED.
Once running, the machine boggs down and I cant really even open the MSRS Control Panel, much less the Wiimote page.
Im hoping that it is something that I am doing wrong in my connections.
Has anyone else been able to get readings from the buttons?
Id like to know how. It would be great to add the extra functionality to the NXT as Im wheeling it about.
Thanks,
Ed
|
|
-
-
Brian Peek



- Joined on Sat, Mar 18 2006
- Niskayuna, NY
- Posts 1,116
|
Hi Eddy, Sorry for the delay. My father passed away very unexpectedly 2 weeks ago so things are in chaos at the moment...
The Wiimote MSRS service was a bit experimental and honestly hasn't been tested in a while. It's very possible that there's a bug and you're experiencing it. I'm not sure when I'll have the time to look again, but I will let you know what I find. Thanks for your patience...
|
|
-
|
|
Hi Brian,
Im so sorry for your loss, I cant yet say I know how you feel, but I do wish for a bit of sunshine on your horizon soon.
This is no critical project for me, so Ill keep poking around and ill check in here periodically.
Good luck,
Ed
|
|
-
-
eddyvette


- Joined on Tue, Feb 26 2008
- Posts 1
|
OK, just to see if it would work or not, I started the program and had it run with the slowdown as I expected.
What I also did was have a neighboring computers browser open to the url of the Wii (as hosted through VPL), and it is showing updates as fast as I can refresh the page, showing button updates as well as accelerometer readings, so your coding seems to work properly.
The only difference I can see is that the host computer is running extremely slow in updating anything. Mouse control is normal, but the VPL gets sluggish and the task manager is running at close to 100% and memory usage slowly creeping up.
That wouldnt bother me so much except that when I try to, for example, push the 'A' button and have one of the LEDs light up, they dont. Now I beleive that the receive end of things (Wii to computer) is working fine, but the sending of messages (computer to the Wii) is affected by things.
Nobody else is commenting on this topic, so I feel that I am the only one experiencing this. However, I have reliably duplicated these results on a second computer, so It cant only be me. Its not easy being a hardware guy in a world of software people.
|
|
-
-
zjeriet



- Joined on Mon, Feb 18 2008
- Belgium
- Posts 11
|
Hello, I'm not completely sure if this is the same issue but I'm using Labwindows CVI. And I see a continous increase of my memory usage when I'm polling the Wiimote. What I do in a loop is reading out the IR and buttons state in a loop and then process the results. When I perform the loop without polling the wiimote my resources stay the same as soon as I read the IR sensor OR the buttons states my memory usage starts going up. Brian is this possible? Is there somekind of allocation of memory that should be freed with some functions? And Eddy does this behavior is similar to your issue? Regards, Zjeriet
|
|
-
-
Eddy


- Joined on Wed, Mar 5 2008
- Posts 4
|
Hi Zjeriet
This sounds similar, but you say this happens when you poll the ir and buttons. Maybe you can help me define 'Poll'
In my mind, 'Poll' means to gather readings. I can do this without troubles and see the results in a browser, but as soon as I try to do something with these readings is when I have problems, such as take the 'A' button and turn it into something else such as an LED or Rumble.
As I mentioned above, even when Im having the slowdown, through a different machine I can see the buton states no problems, its only when I try to do it all on one machine.
Ive not tried anything with the ir yet, im still trying to get the basics down.
Im hoping our findings are related and it proves to be an easy remedy.
|
|
-
-
zjeriet



- Joined on Mon, Feb 18 2008
- Belgium
- Posts 11
|
Indeed polling is gathering the data. So I decide when I want the data from the Wiimote. And when I start continuusly polling the Wiimote my memory usage starts to grow. Only processing the data isn't an issue for my memory. I determined the root cause of this by removing pieces of code. When I removed the reading of the IR sensor and buttons my memory consumption didn't grow anymore. Maybe you could try the same. Because in your case it is still possible it's related to your program and not really due to the Wiimotelib. Try some different things like not reading the states just setting the leds or enabling the rumble and check if the consumption is going up. Then try to read and set it. And if that's all working then you probably have an issue in your program. Otherwise we might have the same problem. Hope this helps Gerrit
|
|
-
-
Eddy


- Joined on Wed, Mar 5 2008
- Posts 4
|
Thanks for the input Gerrit,
Im not good enough with the code to isolate those things, Im a hack at best.
I can set the LEDs and rumble to the Wiimote just fine from another control, like the Direction Dialogue or I also have the wireless Xbox360 controller, but when I try to get a reading from the Wiimote, like button push (I havent advanced enough to play with the ir yet) is when the troubles start.
In MS VPL, I place my Wiimote icon alone and run the program, its fine. I can open my browser through VPL and see updates live like buttons, accelerometer, and everything else. As soon as I drag out another icon: calculate, if, switch, any icon at all, this is when the machine has a problem, I dont even have to connect the icons together. It sems that Wiimote doesnt play well with others.
When using the Xbox360 the same way, it runs fine, so I cant blame VPL. Its got to be the way the Wiimote interacts with the other stuff.
Id be happy to be the trial and error guy for you all, but Im afraid I cant think of any other tests to do to report any other findings.
Thanks! Ed
|
|
Page 1 of 1 (9 items)
|
|
|