How Do You Use Ultimote?

I’m trying to use the accelerometer in my game, but I’m having trouble testing it. I haven’t been able to get Ultimote to send events to the simulator. I tried in both normal and debugging mode, but still, no events where sent.

How do you use Ultimote? [import]uid: 103624 topic_id: 34620 reply_id: 334620[/import]

It should run in debug mode. Also at bottom of ultimote there’s a tick box to enable it if u didn’t see it [import]uid: 7911 topic_id: 34620 reply_id: 137642[/import]

I enabled Ultimote by clicking the check box and then ran my game in debug mode. I am still not receiving any accelerometer events.

[code] local character = display.newImage(“visuals/game_character.png”, 0, 0)

local function move(event)
print(event.xGravity)
end

character:addEventListener(“accelerometer”, move)[/code] [import]uid: 103624 topic_id: 34620 reply_id: 137645[/import]

Change character: to Runtime: [import]uid: 7911 topic_id: 34620 reply_id: 137646[/import]

That worked. I didn’t know that Corona only dispatched the events to Runtime. I figured it would just dispatch to anything that had the “accelerometer” event name. [import]uid: 103624 topic_id: 34620 reply_id: 137651[/import]

@jstrahan,

Thanks for your help! It is much appreciated.

@lKinx,
Also one bug that you should be aware of in this version is that you must have at least one enterFrame listener somewhere in your app for ultimote to work. Otherwise the simulator will not be running any code and the debugger won’t receive any ultimote events. This has been fixed in the current development builds however.

Regards,
M.Y. Developers
[import]uid: 55057 topic_id: 34620 reply_id: 137673[/import]

It should run in debug mode. Also at bottom of ultimote there’s a tick box to enable it if u didn’t see it [import]uid: 7911 topic_id: 34620 reply_id: 137642[/import]

I enabled Ultimote by clicking the check box and then ran my game in debug mode. I am still not receiving any accelerometer events.

[code] local character = display.newImage(“visuals/game_character.png”, 0, 0)

local function move(event)
print(event.xGravity)
end

character:addEventListener(“accelerometer”, move)[/code] [import]uid: 103624 topic_id: 34620 reply_id: 137645[/import]

Change character: to Runtime: [import]uid: 7911 topic_id: 34620 reply_id: 137646[/import]

That worked. I didn’t know that Corona only dispatched the events to Runtime. I figured it would just dispatch to anything that had the “accelerometer” event name. [import]uid: 103624 topic_id: 34620 reply_id: 137651[/import]

@jstrahan,

Thanks for your help! It is much appreciated.

@lKinx,
Also one bug that you should be aware of in this version is that you must have at least one enterFrame listener somewhere in your app for ultimote to work. Otherwise the simulator will not be running any code and the debugger won’t receive any ultimote events. This has been fixed in the current development builds however.

Regards,
M.Y. Developers
[import]uid: 55057 topic_id: 34620 reply_id: 137673[/import]

I have Lua Glider 1.7.2 and I can not get the Glider accelerometer to fire any events.

I am doing the same as the above code above and my app just sits there… tested on mac and windows… what gives?

No print statements coming from my accelerometer event ( run time level )

any other magic i need to do?

thanks

Larry [import]uid: 11860 topic_id: 34620 reply_id: 142817[/import]

I also used the Accelerometer1 sample from corona, and still no go with LUA Glider… this sucks :frowning: Crying here.

And yes I checked the check box to enable so I can drag the Accelerometer controls… lol

Larry [import]uid: 11860 topic_id: 34620 reply_id: 142820[/import]

I have Lua Glider 1.7.2 and I can not get the Glider accelerometer to fire any events.

I am doing the same as the above code above and my app just sits there… tested on mac and windows… what gives?

No print statements coming from my accelerometer event ( run time level )

any other magic i need to do?

thanks

Larry [import]uid: 11860 topic_id: 34620 reply_id: 142817[/import]

I also used the Accelerometer1 sample from corona, and still no go with LUA Glider… this sucks :frowning: Crying here.

And yes I checked the check box to enable so I can drag the Accelerometer controls… lol

Larry [import]uid: 11860 topic_id: 34620 reply_id: 142820[/import]

@M.Y.developers never responded to this… Does ultimote in Lua Glider not support this anymore? [import]uid: 11860 topic_id: 34620 reply_id: 144012[/import]

Hello Larry,

Sorry about the delay. We will look at this issue and let you know as soon as we can. Which Corona build version are you using? Also, have you tried this on the 1.8 beta yet? Please send us an email and we can send you a version to test.

Regards,
M.Y. Developers
[import]uid: 55057 topic_id: 34620 reply_id: 144122[/import]

No i have not tried the 1.8 beta as of yet. I do not have a link to download it.

If you email me one ( my id [at] gmail) then I’ll give it a try :slight_smile:

Thanks

Larry [import]uid: 11860 topic_id: 34620 reply_id: 144240[/import]

Ok i confirmed that the Ultimote and accelerometer in the 1.8 version is working fine and the 1.72+ is not working.

Using new beta thanks

thanks

Larry [import]uid: 11860 topic_id: 34620 reply_id: 144356[/import]

something crazy happened. I put this on my mac - latest OSX version it popped up ok.

i am not sure if an update was going on when i closed it. but the second time I ran it - I only get a NetBeans window that displays. And nothing shows up in the file menu to open any projects or anything

thanks

Larry [import]uid: 11860 topic_id: 34620 reply_id: 144360[/import]