Potentiometer for Gaming Pedals

Hi Guys and Gals,

I am newer than what noobs is and do not know coding.
if any one can help me out with a sketch / code:

My Logitec Pedal started funking-about. I bought 3x potentiometers, but, for now I only want to use 2:

  • Accelerator
  • Brake

Later I would like to use the third one for Clutch, but that is not important now.

I have just got the Arduino Leonardo and wired the units up as I have seen how to do it.

I have wired:

  • A1 for Brakes
  • A2 for Accelerate / Throttle

I want to use the pedals as separate USB hence for buying the Arduino

I am asking pritty please if someone could sketch me a code for this, please, please,,

It is highly unlikely you'll find some who will just "sketch me a code". We can help if you take your best try but if you want to hire someone to sketch you a code try posting in Jobs and Paid Consultancy

I believe this post is similar to what you need:
Car Simulator Arduino Pedals : 7 Steps (with Pictures) - Instructables

I think you will find that "many" Arduino projects have something representative on the Internet if you craft a query carefully.

You can use your favorite search engine and find what you want. Your name speaks for you.

1 Like

Thank you for "what ever info" you have replied that is NON worth. Managed to find that would help me out and I want to say: Thank YOU - the original poster - link provided.

Some "useless" question and notes I have thought about after reading "this" "post's":

This is "Open Source" Software??
This is "To 'HELP' people OUT when in: NEED, STRUGGLE for Coding, Writing to WORK, MANAGE The Arduino Board....???

AGAIN! Thank You to THIS Helper:

YOU ARE A CHARM!!!

You are welcome.
Post your result here when you done.

I have change things in the Code but getting this ERR:
C:\Users\RobertO\Documents\Arduino\Temp Backup\sketch_dec13a\sketch_dec13a.ino:1:10: fatal error: Pedal.h: No such file or directory
#include <Pedal.h>
^~~~~~~~~
compilation terminated.

exit status 1

Compilation error: Pedal.h: No such file or directory

My Code is:

#include <Pedal.h>

Pedal_ Pedal;

int Brake_ = 0;
int Throttle_ = 0;
int Clutch_ = 0;

const bool initAutoSendState = true;

void setup()
{
Pedal.begin();
}

void loop(){
Brake_ = analogRead(A1);
Brake_ = map(Brake_,1023,0,255,0);
Pedal.setBrake(Brake_);

Throttle_ = analogRead(A2);
Throttle_ = map(Throttle_,1023,0,255,0);         
Pedal.setThrottle(Throttle_);

Clutch_ = analogRead(A3);
Clutch_ = map(Clutch_,0,1023,0,255);
Pedal.setClutch(Clutch_);

delay (00);

}

Any help please??

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Pedal.h: No such file or directory

Do you have the Pedal library installed and if so how did you install it ?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.