Comments (12)
Hi,
The example code was removed.
You can refer to readme as a example code.
from arduinojoystickwithffblibrary.
Same for me.
from arduinojoystickwithffblibrary.
Hi,example code is added.https://github.com/YukMingLaw/ArduinoJoystickWithFFBLibrary/tree/master/examples/SingleJoystickFFB
from arduinojoystickwithffblibrary.
Hi,
how to interface the example code with a DIY Yoke/Joystick or stepper/DC-motors/BLDC`s with encoders ?
i hope its "easy" to do.
Can i use the "forces[0] is the X-Axis force data " "forces[1] is the Y-Axis force data" directly for the motor ? or do i need some "math" ?
thanks you very much for your great Library
from arduinojoystickwithffblibrary.
Hi,
The forces[0]
is a data in range[-255,255].So if you use a DC-motor,just use it as a PWM value,Ofcourse use absolute value.
here is a sample:
if(forces[0] > 0){
digitalWrite(4,HIGH);
digitalWrite(5,LOW);
analogWrite(7,abs(forces[0]));
}else{
digitalWrite(4,LOW);
digitalWrite(5,HIGH);
analogWrite(7,abs(forces[0]));
}
If you use a BLDC-Motor or a steper-Motor,you should write some code to drive it.And bind this value forces[0]
as the motor strength.
Hopes it can help you.
from arduinojoystickwithffblibrary.
ok thank you very much :)
So I understand that the encoders are on the output side of the joystick and have nothing to do with the force feedback? only the position of the joystick? Right ? :D
from arduinojoystickwithffblibrary.
Hello
I think that there are some mistakes in the example code, I'll take a look in 2-3hrs and make a pull request.
from arduinojoystickwithffblibrary.
i also have problems compiling
SingleJoystickFFB:15:1: error: 'mygains' does not name a type
mygains[0].springGain = 100;//0-100
from arduinojoystickwithffblibrary.
how to set ffb for steering wheel?
from arduinojoystickwithffblibrary.
i get error compiling
SingleJoystickFFB:14:1: error: 'mygains' does not name a type
mygains[0].totalGain = 100;//0-100
^~~~~~~
SingleJoystickFFB:15:1: error: 'mygains' does not name a type
mygains[0].springGain = 100;//0-100
^~~~~~~
C:\Users\User\AppData\Local\Temp\arduino_modified_sketch_694105\SingleJoystickFFB.ino: In function 'void loop()':
SingleJoystickFFB:41:21: error: 'forces' was not declared in this scope
Joystick.getForce(forces);
^~~~~~
C:\Users\User\AppData\Local\Temp\arduino_modified_sketch_694105\SingleJoystickFFB.ino:41:21: note: suggested alternative: 'fopen'
Joystick.getForce(forces);
^~~~~~
fopen
Using library ArduinoJoystickWithFFBLibrary-master at version 1.0.0 in folder: C:\Users\User\Documents\Arduino\libraries\ArduinoJoystickWithFFBLibrary-master
exit status 1
'mygains' does not name a type
from arduinojoystickwithffblibrary.
Hi,All.
The new example code is available and successful in compiling.
from arduinojoystickwithffblibrary.
Hi,All.
The new example code is available and successful in compiling.
Hi,
could you comment on the codes so everyone knows what's going on there?
pinMode(A2,INPUT);
pinMode(9,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
int value = analogRead(A2);
thank you very much for your fast correction of the example sketch
from arduinojoystickwithffblibrary.
Related Issues (20)
- Y-axis work in MSFS2020 but not X-axis?!?! HOT 1
- BTS7960 + DC Motor for FFB Wheel HOT 6
- rFactor 2 HOT 1
- Try to make FFB on Z Axis (Rudder)?? HOT 6
- No response from potentiometers position when setting unique ID like 0x15!
- updates HOT 1
- Support for RPi Pico HOT 1
- Rumble HOT 1
- Sometimes hard shakes
- Games don't return any force feedback HOT 5
- Games crashing on start, or in control setting menu (arduino pro micro + encoder) HOT 2
- Force Value reverses after hitting 255 HOT 4
- kkk9jj🤣ne ed devo ho b John Moore la il XD la kk
- stearing wheel with ffb, asseto corsa CPU 99%, slow respond in game HOT 1
- it causes my game to crash or get stuck directly,I need help! HOT 4
- Need help. When I connect this project the game crashes !!!!!!!!! HOT 1
- FFB signal HOT 2
- HID report ID parameter cannot be changed (from default 0x01)
- Question regarding Encoder and the driver dll used.
- Game Crash HOT 1
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 arduinojoystickwithffblibrary.