GLBasic forum

Main forum => GLBasic - en => Topic started by: Hark0 on 2010-Jul-21

Title: iPhone acceleration sensor: How simulate Joystick?
Post by: Hark0 on 2010-Jul-21
Hi!

I copy this about acceleration sensor from help file:

"The acceleration sensor of the iPhone can be polled with GETJOYX(0), GETJOYY(0) and GETJOYZ(0) accordingly. The return values are the accelerations for each axis in "G" (9.81 m/s^2)."

Well, I no have joystick, How I simulate/test GETJOY.... without hardware?  O_O

TIA, Hark0
Title: Re: iPhone acceleration sensor: How simulate Joystick?
Post by: backslider on 2010-Jul-21
buy an Iphone/Ipod or an Joystick :)
Title: Re: iPhone acceleration sensor: How simulate Joystick?
Post by: Slydog on 2010-Jul-21
Do you own a Wii?
If so, do you have bluetooth on your PC?  (If not, I've seen dongles for as low as a dollar (insert your country's currency here, ha) or two ).

There are drivers / utils you can download to allow you to use the Wiimote on your PC.
I've never tried it however.
I would think they would allow you to simulate a joystick natively.

Also, I think there is also a project around here to allow the Wiimote to work directly with GLBasic, but I'm not sure what input commands it uses.

Or an XBox controller, but I think you need an extra adapter to get that to work on a PC.

Or, as backslider said, buy a joystick, I just found two cheap ones online at one of our retail stores (thesource.ca).
Title: Re: iPhone acceleration sensor: How simulate Joystick?
Post by: backslider on 2010-Jul-21
Here is a used joystick from amazon... very cheap

http://www.amazon.com/gp/offer-listing/B0000ALFC5/ref=sr_1_2_olp?ie=UTF8&qid=1279745771&sr=8-2&condition=used
Title: Re: iPhone acceleration sensor: How simulate Joystick?
Post by: Kitty Hello on 2010-Jul-22
I also wanted to write some App that can communicate with a windows PC over UDP and send that to the PC. So you could use your iPod to test on Windows.
Using ?IFDEF IPHONE you can do that easily.
Title: Re: iPhone acceleration sensor: How simulate Joystick?
Post by: Hark0 on 2010-Jul-22
I have iphone and IPAD, also 360 and Wii ... I think I'm going to decide to use the wiimote ...

I have no desire to compile on PC, transfer it to the mac, compile, sign, transfer to the iphone / ipad, test ... and back again.

Thank you all for the comments.

;)
Title: Re: iPhone acceleration sensor: How simulate Joystick?
Post by: Kitty Hello on 2010-Jul-22
Is there now WiiMote drivers that can use it as a regular joystick?
Title: Re: iPhone acceleration sensor: How simulate Joystick?
Post by: Slydog on 2010-Jul-22
Glovepie claims their drivers can fully emulate a joystick, plus tons of other features:
http://glovepie.org/glovepie.php (http://glovepie.org/glovepie.php)
Title: Re: iPhone acceleration sensor: How simulate Joystick?
Post by: Hark0 on 2010-Jul-22
Quote from: Kitty Hello on 2010-Jul-22
Is there now WiiMote drivers that can use it as a regular joystick?

Wiinremote

http://onakasuita.org/wii/index-e.html

:P
Title: Re: iPhone acceleration sensor: How simulate Joystick?
Post by: Hark0 on 2010-Jul-22
Quote from: Slydog on 2010-Jul-22
Glovepie claims their drivers can fully emulate a joystick, plus tons of other features:
http://glovepie.org/glovepie.php (http://glovepie.org/glovepie.php)

WOW!!!

GlovePIE Hardware Supported:

    * Nintendo Wii Remote (Wiimote)
    * Sony Dual Shock 3 (except for Gyro) or Sony SIXAXIS
    * NaturalPoint (Or eDimensional) TrackIR, OptiTrack, SmartNav
    * FakeSpace Pinch Gloves (9600 baud by default, but can be changed)
    * Concept 2 PM3 rowing machines (ergo or erg)
    * All joysticks or gamepads recognised by Windows
    * Parallel port gamepads (with PPJoy)
    * All keyboards
    * Mice with up to 5 buttons and 2 scroll wheels
    * Most microphones (don't have to be high quality)
    * Most MIDI input or output devices
    * Essential Reality P5 Glove
    * 5DT Data Glove (all versions)
    * eMagin Z800 3D Visor HMD
    * Polhemus trackers (must be set to 115200 baud): IsoTrak II, FasTrak, Liberty, Patriot, Liberty Latus
    * Ascension trackers: Flock of Birds, MotionStar, etc.
    * Intersense trackers: InterTrax, InertiaCube, IS-300, IS-600, IS-900, IS-1200, etc.
    * WorldViz PPT trackers (all versions)
    * GameTrak (only as a joystick, no direct support)


Thanks!!!
Title: Re: iPhone acceleration sensor: How simulate Joystick?
Post by: dijster on 2010-Jul-23
I use my Xbox 360 pad, I just plug it in and it works.
I don't remember having to mess about or anything to get it running
Title: Re: iPhone acceleration sensor: How simulate Joystick?
Post by: Hark0 on 2010-Jul-26
My test with wiimote (working on XP Sp3) not detected as a Josytick with GLB....  :blink:

Finally my brother has sended and joystick-pad (like ps3) for test...

;)