axe.WiiYourself

BlitzMax Forums/BlitzMax Programming/axe.WiiYourself

skidracer(Posted 2008) [#1]
is available from here:

http://www.gameartnow.com/nitrologic/wiimote101.zip

If you have a windows machine, blue tooth dongle and wiimote, from the control panel's bluetooth manager try adding a device and hold the 1 and 2 buttons down on your wiimote. If it finds it peer it without a passkey and you should be able to use the WiiYourself module.

More info about the WiiYourself! lib, original source and c++ test binary are available here:

http://wiiyourself.gl.tter.org/


FlameDuck(Posted 2008) [#2]
Cool!


.rIKmAN.(Posted 2008) [#3]
I`ve been working on converting this to a b3d DLL for the last few days - learning C++ as I go (and very helpful it was!) - and then you do it better than I ever could :)

Will deffo give this a look, it might convince me to make the move to Max...nice one mate!


Dreamora(Posted 2008) [#4]
Nice one :-)


REDi(Posted 2008) [#5]
Thanks skidracer! Fortunately I ordered a dongle yesterday :D


Gavin Beard(Posted 2008) [#6]
Woo...thanks, this is pretty cool.
just incase anyone hasnt seen, look at the work this guy does, he is brilliant:
Youtube
His site


.rIKmAN.(Posted 2008) [#7]
The headtracking stuff is awesome!


Raz(Posted 2008) [#8]
Awesome, I'm gonna have to give this a go later this year :D


Beaker(Posted 2008) [#9]
Looks great. Am I right in thinking this doesn't have IR data yet?


.rIKmAN.(Posted 2008) [#10]
It should have, as the library does support it.
The code to enable to wiimote report_type is here: w->SetReportType(wiimote::IN_BUTTONS_ACCEL_IR_EXT);

But I couldnt get this working in my dll wrapper either, even though the demo that comes with it works fine (using my Wii sensor bar), and everythin else works (buttons, acceleration, orientation) my wrapper just won`t see the IR stuff.

I also can`t see any way to set things such as LED Status or Rumble in this mod...but I ain`t the best so maybe I just can`t see it?
I have functions for these in my wrapper: BB_WiimoteRumble() BB_WiimoteSetLEDs() etc - but then maybe I just don`t understand all the bits and masking etc going on - I kinda learnt as I wrapped - maybe I did it arse upwards.

Best wait for skid to confirm whats in/not in and if this is going to be updated at all.


jhocking(Posted 2008) [#11]
sweet!

posted in this thread:
http://www.blitzmax.com/Community/posts.php?topic=74874

Ordered a wiimote yesterday, darn delivery time...



plash(Posted 2008) [#12]
http://blogs.msdn.com/coding4fun/archive/2007/03/14/1879033.aspx
Another good wiimotelib, that i was planning on writing a wrapper for.

But I'm not that great in advanced VB stuff.


EDIT: oh, i just noticed wiiyourself was based off the one i posted.


CASO(Posted 2008) [#13]
Just curious...
1. Does it really work?
2. Do you have to use the Wii sensor bar?
3. How easy is it to implement as input for BMax?

It sounds like lots of fun to play around with!


.rIKmAN.(Posted 2008) [#14]
1. Yeah it works
2. No you don`t have use the Wii Sensor Bar.
You can get all the buttons and accelerometer data without any sensor bar, if you want the IR stuff too you can make your own, buy a 3rd party one or use candles (check youtube).

3. I`ll let others answet that one, I`m a Max newb!


Nigel Brown(Posted 2008) [#15]
ReadME.txt says (currently) Windows, any news when mac will be supported?


jhocking(Posted 2008) [#16]
I already know of a couple wiimote applications for OSX, like Darwiin Remote:
http://www.wiili.org/index.php/DarwiinRemote

So clearly someone out there knows how to interface a wiimote with OSX, but I don't know if there is a library for this available.


skidracer(Posted 2008) [#17]
I'll see if I can get the darwiin driver going today. New version with IR reporting and LED/Rumble controller will also be available soon.


jhocking(Posted 2008) [#18]
New version with IR reporting

yay


CASO(Posted 2008) [#19]
Building .wiiyourself
Compiling:.wiiyourself.bmx
flat assembler version 1.66
3 passes, 0.1 seconds, 3134 bytes.
Linking:.wiiyourself.exe
M:/Programs/BlitzMax/bin/ld.exe: cannot find -lhid
Build Error: Failed to link M:/Programs/BlitzMax/mod/axe.mod/wiiyourself.mod/doc/.wiiyourself.exe
Process complete

Huh?


skidracer(Posted 2008) [#20]
CASO, you may need more recent version of MingW installed?


skidracer(Posted 2008) [#21]
OK, new version is up, (link modified above).


Infrared added but not tested, apparently it has a 1024x768 resolution infrared camera and can report xy of 4 dots.

Didn't manage to get much done for OSX, it will need 10.4 or above and from the looks all the files required are included and building. Started the implementation (see WiiRemoteGlue.m) but need to test the darwiin project to make sure it actually works on my setup before going any further.

axis assignment is as follows:


wiimote

axis[0] Acceleration.X;
axis[1] Acceleration.Y;
axis[2] Acceleration.Z;
axis[3] Acceleration.Orientation.X;
axis[4] Acceleration.Orientation.Y;
axis[5] Acceleration.Orientation.Z;
axis[6] Acceleration.Orientation.Pitch;
axis[7] Acceleration.Orientation.Roll;

axis[8] IR.Dot0.X
axis[9] IR.Dot0.Y
axis[10] IR.Dot1.X
axis[11] IR.Dot1.Y
axis[12] IR.Dot2.X
axis[13] IR.Dot2.Y
axis[14] IR.Dot3.X
axis[15] IR.Dot3.Y

nunchuk

axis[16] Nunchuk.Joystick.X;
axis[17] Nunchuk.Joystick.Y;
axis[18] Nunchuk.Acceleration.X;
axis[19] Nunchuk.Acceleration.Y;
axis[20] Nunchuk.Acceleration.Z;
axis[21] Nunchuk.Acceleration.Orientation.X;
axis[22] Nunchuk.Acceleration.Orientation.Y;
axis[23] Nunchuk.Acceleration.Orientation.Z;
axis[24] Nunchuk.Acceleration.Orientation.Pitch;
axis[25] Nunchuk.Acceleration.Orientation.Roll;

classic controller

axis[16] ClassicController.JoystickL.X;
axis[17] ClassicController.JoystickL.Y;
axis[18] ClassicController.JoystickR.X;
axis[19] ClassicController.JoystickR.Y;
axis[20] ClassicController.TriggerL;
axis[21] ClassicController.TriggerR;


add 32 for player 2, 64 for player 3 (multiplayer code untested)



CASO(Posted 2008) [#22]
I have the latest version of MinGW and the env. paths are set...
Any other ideas?

EDIT: I figured something out, but should you have to manually copy files out of the MinGW 'lib' folder and into the BMax 'lib' folber.


REDi(Posted 2008) [#23]
Yay my dongle arrived! :D

noticed one problem though, if I ran the following code and click on the window frame to drag it or change focus to another window, the app stops responding.


IR seems to be working though!


skidracer(Posted 2008) [#24]
You will need a call to PollSystem for that loop to behave.


.rIKmAN.(Posted 2008) [#25]
Excellent - just bloody excellent!! :)

Just to confirm IR stuff is working too Simon, both with Nunchuk connected and not connected.
I only have 1 wiimote tho (bloody shortages!) so can`t test multiple controllers.

I will tidy up what I have done so far for on my b3d .dll and release it "as-is" if anyone wants to have a look, build on it or just laugh at it ;)
Not too sure its any good but it works in B3D (everything apart from IR).

Top work anyway, now I just need some free time :)


Difference(Posted 2008) [#26]
This is GREAT fun. Thanks for creating it.
A little minib3d example below




jhocking(Posted 2008) [#27]
aargh I got my wiimote but my bluetooth adapter doesn't arrive for another week. Why oh why did I order that online?


CASO(Posted 2008) [#28]
I went to Bestbuy and bought the $30 iogear dongle and after hours of driver wrestling...
-ACCELERATION WORKS
-IR WORKS (With Wii Sensor Bar or A Candle)
-MULTIPLE CONTROLLERS WORK
-NUNCHUK WORKS

Need anymore testing?


kronholm(Posted 2008) [#29]
Works fine here as well with a D-Link DBT-120 bluetooth dongle.

Anyone got some light reading on coding for this wonderful piece of equipment (wiimote)? Just can't really seem to wrap my head around the different axis and such :p


kronholm(Posted 2008) [#30]
Might be a bug, might not, but it seems SetWiimoteRumble() and SetWiimoteLEDS() only works after you run pollwiimotes() for the first time?


Beaker(Posted 2008) [#31]
I can't get the example to compile. I get a message:
"Compile error: can't find interface for 'axe.wiimote'"

Any ideas? I think I have MinGW setup correctly, but maybe not. Any instructions for setting it up correctly?


Beaker(Posted 2008) [#32]
Wierdly, the old wiiyourself version works fine.


plash(Posted 2008) [#33]
i connected my wiimote, and OpenWiimotes() is returning zero.

any ideas?


Beaker(Posted 2008) [#34]
Have you tried the Demo.exe in the download from the official wiiyourself website? Might give you a better idea.


Uncle(Posted 2008) [#35]
This is a great Lib. I noticed in the WiiYourself demo you can return the size of the IR Dot, however I dont see it in any of the axis information above? Is it possible to retrieve this info as well?

Cheers.


jhocking(Posted 2008) [#36]
Yeah, size of the IR dot could be very useful for determining how far it is from the camera.


Beaker(Posted 2008) [#37]
Skid - any ideas why your old wiiyourself example compiles in bmax but the newer wiimote example doesn't?


sswift(Posted 2008) [#38]

if you want the IR stuff too you can make your own, buy a 3rd party one or use candles



I have attached two candles to the sides of my head with a rubber band, but it's not working. Do I need to light them?


.rIKmAN.(Posted 2008) [#39]
I have attached two candles to the sides of my head with a rubber band, but it's not working. Do I need to light them?


LOL!
Only once you have sprayed your hair with highly flammable hairspray - helps the wiimote pickup the IR if the whole head is alight.


Beaker(Posted 2008) [#40]
Got it working thanks to ziggy:
http://ziggybcn.proboards31.com/index.cgi?board=publisher&action=display&thread=1199705748


jhocking(Posted 2008) [#41]
On the one hand I've got wiimote input in BlitzMax working, and that's exciting! On the other hand, it isn't picking up IR. Neither is IR working in the wiiyourself demo, so I know this isn't a problem with skidracer's work making the library into a module. Also, I don't have a wii, only a wiimote, so I suppose I'm not 100% sure I've been providing it a good IR source to pickup on. Still, I've tried waving both a TV remote and a lighter in front of the wiimote and I'm getting nothing.

Any thoughts? I'm thinking I should try with a different Bluetooth driver, only er I'm not sure how to remove the Widcomm driver that came with the dongle and use the drivers built into Windows.

ADDITION: I updated the driver and now the wiimote isn't connecting at all. grrr

ADDITION 2: So I removed the Widcomm software from the Add/Remove Software thing in Control Panels and now IR works. Seems ironic that if I hadn't installed the software that came with the Bluetooth dongle I'd have been better off. Ironic, but not surprising.


.rIKmAN.(Posted 2008) [#42]
From what I`ve read and from using it with my own dongle, the BlueSoleil stack is the best.
However the Toshiba stack and the MS stack both have been confirmed to work also.

I just need to get MiniB3D working (getting black screen) and then I can start having some fun!


Yahfree(Posted 2008) [#43]
not sure if this guy's video was already linked, but look what hes doing with the wii-mote:

http://www.youtube.com/watch?v=KyvIlKSA0BA


and here's nintendos next gaming system: (just kidding, but who knows, another 10 years and this could be in your living room)

http://www.youtube.com/watch?v=qTnnJR-hS7k&feature=related


Beaker(Posted 2008) [#44]
These are similar to the last link:
http://www.youtube.com/watch?v=DnNWfJveZDI
http://www.trnmag.com/Stories/2004/081104/Shifty_tiles_bring_walking_to_VR_Brief_081104.html

I don't believe immersive VR brings anything useful to the experience tho.


jhocking(Posted 2008) [#45]
I don't believe immersive VR brings anything useful to the experience tho.

What experience are you referring to? It's a little disingenuous to say "the experience" without being specific. I can see these things being very useful for certain applications and not others. Y'know, just like every other technology.


Beaker(Posted 2008) [#46]
Yeah, you are probably right. But, I don't see it adding much to gaming and the like, and in all situations I think VR goggles can take something away, ie. by creating nausea, headaches, dizziness, eyestrain etc.

It's similar to the way in which first person 3D is a problem (over 2D or 3rd person views) for some people/nationalities/genders, which along with the massive expense and general unavailability make VR much more of a minority sport. This in turn would deter quality development.

I remember that there was once a VR 'arcade' in my town. The games were rubbish, and the graphics 10 years out of date. The novelty soon wore off and it closed down. This possibly damaged the whole image of VR for anyone living in the area.

The wiimote (and the wii) has made gaming more accessible, but to me VR makes it less so. It's a fine line that games consoles have managed to miss for quite a while now, alienating many people that once enjoyed them.

I am playing devils advocate a little, but its easy to assume that more/better technology in the shape of VR is "awesome dude" without questioning whether we desire or need it.

Worth a discussion at least.


jhocking(Posted 2008) [#47]
Well don't let the fact that the one VR arcade you experienced had shitty games turn you off to the entire concept. VR when used for the right purpose is amazing, but when used for a shitty game, well then you're just left with all the downsides (nausea, eyestrain, wearing a silly outfit, etc.) and no upside.

Incidentally, your comment that indicates you think of the wiimote and VR as separate things is a red flag to me. I realize your earlier post spoke of immersive VR and that's a more specific thing than just saying VR (I think you may already understand this distinction but your language makes that unclear,) but the point remains that you are criticizing the entire concept based on one shitty implementation. Well okay, not just one shitty implementation; as you allude to, the whole overhyped idiocy from when VR was all the rage has definitely done enormous damage to how people perceive VR technologies. Remember the Powerglove? How about Virtual Boy? *shudder*

It's taken a long time, but with the wii the technology is finally something that the average consumer actually appreciates, and I do see the wiimote as a VR technology. I don't see VR as a specific device or even combination of devices, but rather a concept, that of a computer generated world which a person experiences as if it is real (note that the display technology is not part of this definition.) I know a lot of people pretty much think "VR" is synonymous with head-mounted displays, but if you really think about the term "virtual reality" then you will realize the hardware itself is not a defining feature of the term (otherwise terms like "VR goggles" and "VR display" would be redundant.) To see what I'm getting at, google the term "fishbowl vr" and maybe look at some of the projects on my website.


I do agree that people should question technology more than they do, but not so much because the technology isn't useful for anything. Rather, people need to think harder in order to get something positive out of the technology, instead of just doing the first thing that pops into their head.


EDIT: Also, thank you for prompting me to ruminate on these issues! It took me a while to articulate what I think VR means, and the effort was very useful to me; I think I may write a paper using this post as a starting point.


Beaker(Posted 2008) [#48]
It is interesting to ponder the whole VR thing. I do agree that VR is a very wide concept, infact I've always considered film/cinema (and books, theatre) as a form of VR. When you consider it in this light then you must question the success of any particular new 'implementation' against older ones: the success (so far) and reasoning of wearing goggles against sitting in a darkened room looking at a screen/box, or even reading in bed/bus/toilet. What exactly does the new thing offer over the old, beyond spectacle, newness, and possibly physical exercise. :)

I'm not totally against more immersion, I really liked the implementation of head tracking using the wiimote that can be seen on youtube. That to me seems more useful in many ways.
http://www.youtube.com/watch?v=Jd3-eiid-Uw

Good look with the paper.


fredborg(Posted 2008) [#49]
I can't get it to work. The wiimote connects fine (as a Human Interface Device) according to the BlueSoleil interface, but neither skids example nor the demo from wiiyourself registers the wimote.

Any ideas what might be the problem?


Difference(Posted 2008) [#50]
Using BlueSoleil, I connect and then "discover service".
Then I click(or double click) the "Human inteface device" icon (the mouse) and then it stays connected and works.


fredborg(Posted 2008) [#51]
It's connected according to the BlueSoleil interface, and the 4 LEDs on the wiimote are flashing constantly. But wiiyourself demo doesn't pick it up.. it keeps saying: 'Looking for Wiimote...'

I'm on vista and after connecting the wiimote to bluesoleil it asks for a driver... But I was under the impression no driver was needed?


Difference(Posted 2008) [#52]
If the "mouse" icon is green (not yellow) in BlueSolei "Hovevindue" , then I don't know what to do.


fredborg(Posted 2008) [#53]
Yep, the mouse icon is green ... it's very strange that wiiYourself doesn't pick it up.


skidracer(Posted 2008) [#54]
Remove the device it's added and try holding down the 1 and 2 buttons all the way through from detection / installing to running the demo. If it asks say no to a passkey, and if it immediately finds a second device after telling you it found it the first time cancel out of that sequence. Other ideas here:

http://www.wiili.org/index.php/HowTo:BlueSoleil


Roland(Posted 2008) [#55]
Hey guys,

any chance of getting this wrapped for B3d as well? It would be awesome to be able to use this lib directly for B3d too!

thanks,
roland


Digital Anime(Posted 2008) [#56]
This is really cool stuff.

Think i'll go out and buy a remote myself next month just to play a bit with it in Blitzmax and who knows create a full game :-)

My only question in here is if it is possible to play sound over the remotes speaker as well on the PC.


Dreamora(Posted 2008) [#57]
No
Even on Wii, only selected third party companies got the documentation on how to do that, which is the reason primarily first and second party games are able to use it.


Beaker(Posted 2008) [#58]
That's a huge shame. :/


Digital Anime(Posted 2008) [#59]
It's all a matter of time....

I did find this article in wich they where able to hack the speaker with the source of an example script included.

http://wiihacks.blogspot.com/2007/01/wii-remote-speaker-communication.html

This could help to make the mod even better

Let's make a Yes of that No...


z80jim(Posted 2008) [#60]
what's a dongle, and I have a mac so if you share the source code I can compile it for macs :)


Kistjes(Posted 2008) [#61]
I have Wii controllers, too! So time for some physical action!

But...
CASO wrote 2 months ago:
Building .wiiyourself
Compiling:.wiiyourself.bmx
flat assembler version 1.66
3 passes, 0.1 seconds, 3134 bytes.
Linking:.wiiyourself.exe
M:/Programs/BlitzMax/bin/ld.exe: cannot find -lhid
Build Error: Failed to link M:/Programs/BlitzMax/mod/axe.mod/wiiyourself.mod/doc/.wiiyourself.exe
Process complete


I have the same error when I compiled my first Wii-program: cannot find -lhid
I have build the axe.wiimote.mod

There is always something wrong when installing modules :(
(MingW related or missing file in lib folder).
What's wrong now?


Digital Anime(Posted 2008) [#62]

M:/Programs/BlitzMax/bin/ld.exe: cannot find -lhid



I remember that the ld.exe included in Blitzmax itself is an older version.
Did you try move the ld.exe from MinGW to the blitzmax/bin dir?
Check if the MinGW file is newer.
the MinGW ar.exe is also newer if I'm correct.


Kistjes(Posted 2008) [#63]
Thanks for the tip but both files are newer in the BlitzMAX\bin folder.
Nevertheless I replaced the files from MingW to blitzmax but I get the same result.


Charrua(Posted 2008) [#64]
Hi, I'm late with wiimote but is better than never.

the link http://www.gameartnow.com/nitrologic/wiimote101.zip seem's to be inactive.

any one has that file or has a new link?

thanks

Juan


cfavreau(Posted 2009) [#65]
Pretty sure it moved here:

http://code.google.com/p/max-edit/source/detail?r=20

I am on the hunt for it as well.


Uncle(Posted 2009) [#66]
I've uploaded the version I have kicking around my HD. You can download it at...

http://www.urbaninteractive.net/axe.mod.zip


cfavreau(Posted 2009) [#67]
Any ideas how to get past the -lhid error posted above when compiling the example with the doc folder? I downloaded the whole thing off of the google code site and have gotten it to compile. Just need to get past the ld.exe error. Do I need the WinDDK? Thanks.


cfavreau(Posted 2009) [#68]
Ok... I found the hid.lib hidparse.lib and setupapi.lib in the winddk/####.####/lib folder and copied them into the Blitz Max lib folder. Now I get:

Building openwiimotes
Compiling:openwiimotes.bmx
flat assembler version 1.64
3 passes, 3805 bytes.
Linking:openwiimotes.debug.exe
C:/Program Files/BlitzMax/mod/pub.mod/wiimote.mod/wiimote.debug.win32.x86.a(wiimote.cpp.debug.win32.x86.o)(.text+0x3049):wiimote.cpp: undefined reference to `std::_List_node_base::hook(std::_List_node_base*)'
C:/Program Files/BlitzMax/mod/pub.mod/wiimote.mod/wiimote.debug.win32.x86.a(wiimote.cpp.debug.win32.x86.o)(.text+0x3628):wiimote.cpp: undefined reference to `_imp__HidD_GetHidGuid@4'
C:/Program Files/BlitzMax/mod/pub.mod/wiimote.mod/wiimote.debug.win32.x86.a(wiimote.cpp.debug.win32.x86.o)(.text+0x3635):wiimote.cpp: undefined reference to `_imp__SetupDiGetClassDevsA@16'
C:/Program Files/BlitzMax/mod/pub.mod/wiimote.mod/wiimote.debug.win32.x86.a(wiimote.cpp.debug.win32.x86.o)(.text+0x3679):wiimote.cpp: undefined reference to `_imp__SetupDiGetDeviceInterfaceDetailA@24'
C:/Program Files/BlitzMax/mod/pub.mod/wiimote.mod/wiimote.debug.win32.x86.a(wiimote.cpp.debug.win32.x86.o)(.text+0x369b):wiimote.cpp: undefined reference to `_imp__SetupDiGetDeviceInterfaceDetailA@24'
C:/Program Files/BlitzMax/mod/pub.mod/wiimote.mod/wiimote.debug.win32.x86.a(wiimote.cpp.debug.win32.x86.o)(.text+0x36e3):wiimote.cpp: undefined reference to `_imp__HidD_GetAttributes@8'
C:/Program Files/BlitzMax/mod/pub.mod/wiimote.mod/wiimote.debug.win32.x86.a(wiimote.cpp.debug.win32.x86.o)(.text+0x3a0e):wiimote.cpp: undefined reference to `_imp__SetupDiEnumDeviceInterfaces@20'
C:/Program Files/BlitzMax/mod/pub.mod/wiimote.mod/wiimote.debug.win32.x86.a(wiimote.cpp.debug.win32.x86.o)(.text+0x3a1f):wiimote.cpp: undefined reference to `_imp__SetupDiDestroyDeviceInfoList@4'
C:/Program Files/BlitzMax/mod/pub.mod/libpng.mod/libpng.debug.win32.x86.a(pngrutil.c.debug.win32.x86.o)(.text+0x1b28):pngrutil.c: undefined reference to `__strtod'
C:/Program Files/BlitzMax/mod/pub.mod/libpng.mod/libpng.debug.win32.x86.a(pngrutil.c.debug.win32.x86.o)(.text+0x1b54):pngrutil.c: undefined reference to `__strtod'
Build Error: Failed to link C:/Documents and Settings/Chris/Desktop/Desktop/Personal Projects Desktop/Blitz Basic Programming/openwiimotes.debug.exe
Process complete


Which I think is the linker saying that it can't find the actual functions to link to. They probably are missing from the lib files? Not sure. Anyone else run into this problem?


skidracer(Posted 2009) [#69]
Ok... I found the hid.lib hidparse.lib and setupapi.lib in the winddk/####.####/lib


Don't think that will work, mingw compatible hid libs are distributed as standard with mingw.


wmaass(Posted 2009) [#70]
I managed to get a Wiimote working in BlitzMax with this but I am finding that when polling the Wiimotes in the main loop I'm taking huge frame rate hits. Anybody else have this?


wmaass(Posted 2009) [#71]
Seems like when there is an updateworld() in the loop with PollWiimotes() it slows down to a crawl.


CASO(Posted 2010) [#72]
What ever happened to this mod? Was it abandoned? Was it replaced?


Robert Cummings(Posted 2010) [#73]
I don't think it needs any more work? :P


CASO(Posted 2010) [#74]
Then where is it?


jkrankie(Posted 2010) [#75]
svn checkout http://max-edit.googlecode.com/svn/trunk/mod/axe.mod/wiimote.mod/

Ta-da!

Haven't tried it though, although it seems to be on the maxedit googlecode page...

Cheers
Charlie


wmaass(Posted 2010) [#76]
I am unable to set LEDs or rumble status. Anyone have any luck with this? I need to find a way to keep the Wiimote "awake" if it has not been used for hours at a time. I figure if I can send it a rumble now and then or set an LED it will stay awake.