Comments (8)
Hi there -
By default, the left stick is mapped to the X and Y axes in Windows, so if you
only have one joystick in your controller, if you map your joystick input to
leftStickX and leftStickY in Unojoy, things should work. I would also make
rightStickX = 128 and rightStickY = 128, since if any of your programs
recognize the Z axis, this will keep that axis from moving about wildly.
Let me know if that helps or not!
Original comment by [email protected]
on 27 Jul 2012 at 3:48
- Added labels: ****
- Removed labels: ****
from unojoy.
Hello and thanks for your answer,
I map my joystick like this: leftstickX -> A3 (left in my gamepad), leftstickY
-> A4 (up), rightstickX -> A5 (right)and rightstiskY -> A2 (down). Is this ok ?
in this mode the right and down is Z axes.
You say " I would also make rightStickX = 128 and rightStickY = 128", but where
i change this ? in Unojoy.h ?
Thanks.
Original comment by [email protected]
on 28 Jul 2012 at 11:50
- Added labels: ****
- Removed labels: ****
from unojoy.
What code are you using? In your program, at some point, you should be setting
up a dataForController_t variable (let's call it controllerData), and at some
point in your code, assigning values to it's data members, such as
controllerData.leftStickX or controllerData.circleOn.
Original comment by [email protected]
on 29 Jul 2012 at 5:40
- Added labels: ****
- Removed labels: ****
from unojoy.
Hi,
encolsed the programmes I use in arduino. It's juste a modified exemple
programme.
thank you for your help.
Original comment by [email protected]
on 29 Jul 2012 at 4:20
- Added labels: ****
- Removed labels: ****
Attachments:
from unojoy.
Okay, so down in the code here:
controllerData.leftStickX = analogRead(A3) >> 2 ;
controllerData.leftStickY = analogRead(A4) >> 2 ;
controllerData.rightStickX = analogRead(A5) >> 2 ;
controllerData.rightStickY = analogRead(A2) >> 2;
That sets up what pins will be read in as the left and right joysticks. So,
you can either change the code here, or you can have the lines from your
joystick go into Analog Pin 3 and 4 in order to control the left joystick.
Original comment by [email protected]
on 30 Jul 2012 at 6:28
- Added labels: ****
- Removed labels: ****
from unojoy.
ok I understand, I mixed the stick, these are the two sticks on the pad. I'm
stupid. I thought the right stick is up and down. windows find the up and down
Thank you for your help,
Original comment by [email protected]
on 31 Jul 2012 at 2:05
- Added labels: ****
- Removed labels: ****
from unojoy.
No problem! I'm glad you got things working!
Original comment by [email protected]
on 31 Jul 2012 at 4:55
- Added labels: ****
- Removed labels: ****
from unojoy.
Original comment by [email protected]
on 31 Jul 2012 at 4:57
- Changed state: Done
- Added labels: ****
- Removed labels: ****
from unojoy.
Related Issues (20)
- Trying to install the lionunojoydriver.pkg
- Windows .bat file included in OS X release
- Compatibility With Atmega328 HOT 2
- Can't get dfu programmer to work on Osx HOT 2
- Can`t run Leojoy sample file HOT 1
- Request: Xbox360 Passthrough for MegaJoy
- Patch for /LeoJoy/hardware/leojoy/cores/leojoy/USBCore.cpp
- MegaJoy Analog function not reading correctly in Win7 HOT 4
- After installing drivers, Win7-64 sees new hardware continuously HOT 1
- UnoJoyProcessingVisualizer HOT 6
- Turninto Arduino Impossible ! HOT 1
- Unable to change Joystick back to DFU mode
- Force Feedback? HOT 6
- Unable to flash - enter DFU mode? HOT 1
- Atmel flip doesn't start up error code 2 HOT 4
- The 64 buttons all the time flashing
- Processing visualizer HOT 1
- UnoJoyProcessingVisualizer bad com port discovery HOT 1
- The proccesing sketch showing error "ControlP5 controlP5; cannot find class or type named HOT 4
- Can't install lionunojoy driver
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unojoy.