Fino
Fino copied to clipboard
Add support for steering wheels
Add support for steering wheels
hi @f2knpw , pinging you here as I intend to add support for wheels during this weekend. I'll create a new branch with that
fantastic !
I just added support for wheels and pedals into the wheel
branch. Please let me know if this works for you as I don't have any device to test this with at the moment. At least it compiles 🤞
thank you. I am just beginning the story... Please could you confirm that an arduino Pro Micro (cheap chineese clone) will be ok ? this ref : https://fr.aliexpress.com/item/32840365436.html?spm=a2g0o.productlist.0.0.27a0a42bTmeDhn&algo_pvid=null&algo_expid=null&btsid=0bb47a2216229096533377906e0ce0&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_
I'm using a clone that looks exactly like that. You should be fine. Just check that it's a 5V clone (that link is good) and it should all work as expected
Great :-) I buy one right now ! Thanks
I'm using a clone that looks exactly like that. You should be fine. Just check that it's a 5V clone (that link is good) and it should all work as expected
What would be the problem with a 3.3v version?
I have tried to download the wheel branch, but it is not accessible ! Thanks for your help
sorry about that. Can you try again?
I'm using a clone that looks exactly like that. You should be fine. Just check that it's a 5V clone (that link is good) and it should all work as expected
What would be the problem with a 3.3v version?
It would probably work mostly fine, but the two main issues is that their processors are slower so they cannot calculate the forces as often and might feel a bit worse and also that it seems easier to me to get electronic parts for a 5V when checking online
https://www.youtube.com/watch?v=XlSpdiV6lzY
Here I tested out the Fino firmware on a pro micro. As you can see it does work. The motor control part was not explained well, I tried to mess around with the values for a bit but I didn't get a good result. If you look on the oscilloscope you can see either 100% duty or 0 and very little in between. If someone can explain this line like what everything does , what are the ranges, etc. I can try to figure out what is the correct values to use on my motor. analogWrite(ROLL_R_PWM,map(abs(forces[0]), 0, 10000, 60, 244));
that's great to see! Yes, I definitely need to write some more documentation, but the problem is that most of it depends on which motor controller you are using so outside of the scope of this library which is more about the software side of things.
What I'd recommend you is start without using this library and try to create a sketch that sends some movement to the wheel. You should find examples online depending on your motor controller. Something like this looks like a great tutorial to me but I'm not sure if that's the same one you are using: https://howtomechatronics.com/tutorials/arduino/arduino-dc-motor-control-tutorial-l298n-pwm-h-bridge/
analogWrite
is how you send to the controller how strong is the movement you want the motor to do. It can be a number from 0 to 255.
Most probably, your motor will not even start moving until you reach 60 and you don't want to reach 255 strength but limit it to 244. That's what those numbers in the code you asked about mean and you can find them by testing your hardware and finding the minimum and maximum values you want to send to the motor. That tutorial link I pasted above has sample code for a L298N and changes the forces sent to the motor depending on a potentiometer so that's perfect for figuring out these two values