Hey guys, im making a school project.
I want to make a simple racing simulator using the Arduino Leonardo. I have included a small sketch in the attachments.
The idea is that when the pedals are moving it will run a dynamo or something and the arduino will catch that and it will simulate the press of "W" on the keyboard as this is the common button for accelerate in racing games. Then whenever a pushbutton(attachment) it pressed it will simulate the press of "S" instead of "W" when moving the pedals.
The round sticks on the sides will simulate "A" and "D". I don't know for sure how yet, but maybe by attaching them to a volume switch or something and then when it goes above a certain level it will press the button.
Yes that could work. Is this a design-only project or will you build it?
The easiest way to measure the pedal speed might be to have a tiny "bump" on the wheel that activates a microswitch once per revolution. Microswitches that have a tiny roller wheel on the end of a short arm would be ideal. Alternatively, attach a small magnet to the wheel and use a reed switch or a Hall effect sensor to pick up the magnetic field as it passes.
PaulRB:
Yes that could work. Is this a design-only project or will you build it?
The easiest way to measure the pedal speed might be to have a tiny "bump" on the wheel that activates a microswitch once per revolution. Microswitches that have a tiny roller wheel on the end of a short arm would be ideal. Alternatively, attach a small magnet to the wheel and use a reed switch or a Hall effect sensor to pick up the magnetic field as it passes.
Thanks for answering!
I am going to build this.
Awesome idea you've got regarding the microswitch, i just don't know how i would build it. However if i stick with the dynamo idea, will i be able to use a transistor to read whenever its generating power?
No, that's not what transistors do. Do you really mean dynamo, or do you mean alternator? What will you do with the power generated by the dynamo? You will need to dissipate that power somehow. I think the microswitch idea would be much simpler.
PaulRB:
No, that's not what transistors do. Do you really mean dynamo, or do you mean alternator? What will you do with the power generated by the dynamo? You will need to dissipate that power somehow. I think the microswitch idea would be much simpler.
Oh yeah, i see. I hoped that i would be able to use the transistor as a kind of switch, but that may not be the way it works. I think i will improvise and use the microswitch somehow