Lexus RX Steering Wheel Buttons

I'm not familiar with that. Can you post a link?

PaulRB:
I’m not familiar with that. Can you post a link?

The link to UnoJoy is GitHub - AlanChatham/UnoJoy: UnoJoy! allows you to easily turn an Arduino Uno (or Mega or Leonardo) into a PS3-compatible USB game controller

By the way, I connected everything like in my sketch. I used the following code:

int analogPin= 0;
int raw= 0;
int Vin= 5;
float Vout= 0;
float R1= 1000;
float SW1= 0;
float buffer= 0;

void setup()
{
Serial.begin(9600);
}

void loop()
{
raw= analogRead(analogPin);
if(raw) 
{
buffer= raw * Vin;
Vout= (buffer)/1024.0;
buffer= (Vin/Vout) -1;
SW1= R1 * buffer;
Serial.print("Vout: ");
Serial.println(Vout);
Serial.print("SW1: ");
Serial.println(SW1);
delay(1000);
}
}

And it worked! However, the constant SW1 value is 10 and some buttons also read as 10. Other buttons have different readings like 3000 and 1000. However, I sometimes need to hold down a button to get a reading other than the constant value. I also used 3.3V to light up the LEDs.

In one of your previous posts, you mentioned that I just need a reading from A0 without needing the “known resistor”. Would I just connect SW1 to A0. And SWG to ground? And what type of code would this require? I also tried this method, and I got a constant 1 reading no matter what button I pressed.

That UnoJoy thing looks very complex for a beginner. If you did something wrong, you might brick your Uno. I would still advise buying a Pro Micro. It's a much simpler and well tested.

I didn't say you would not need the known resistor. What I said was that your code does not need know what value it is, or what voltage is being used. It simply needs to use the raw reading from analogRead() and compare that to the range produced by each button.

PaulRB:
It simply needs to use the raw reading from analogRead() and compare that to the range produced by each button.


When I connect only SW2 and SWG, the Voice, Off Hook, and On Hook buttons that I circled in green are detected and work perfectly.

However, when I connect only SW1 and SWG, the Seek+, Seek-, Volume+, Volume-, and Mode buttons that I circled in red are not detected and do not work at all.

The schematic leads me to believe that I need to connect SW1, SW2, and SWG in order for the entire circuit to work. How would I do that? Would I use A0 and A1 for each SW1 and SW2? Or would I connect one of the SW1 or SW2 to 5V?

In regards to my last post, is this the correct way to connect SW1, SW2, and SWG all at the same time? Or, will the circuit still be incomplete?

A follow up to my last post:

I connected everything as indicated in my last post. Every button works now, except for Volume - … ::slight_smile:

Yes, your circuit looks fine.

If you connect SW1 and SWG to your multimeter (on resistance setting) can you detect a difference when vol- is pressed? What readings do you get?

PaulRB:
Yes, your circuit looks fine.

If you connect SW1 and SWG to your multimeter (on resistance setting) can you detect a difference when vol- is pressed? What readings do you get?

I have been meaning to get a multimeter for a long time now, but I somehow got away with wiring a lot of electronics without a multimeter. :sweat_smile:

My next question would be better answered if I actually had a multimeter, but I am using the car's electronic wiring guide for now. And this question might be more universal.

For some reason, when I wire my Arduino, breadboard, and corresponding car wires this way in the picture below, all the buttons are detected correctly.

However, when I wire my breadboard this way in the picture below, the buttons are detected correctly sometimes, but other buttons appear to be pressed from different switches randomly. For example, when I press Enter from the Enter button wiring, the Mode button from the other side on Switch 2 wiring is also pressed simultaneously even though I am not pressing the Mode button.

I was meaning to possibly use heat-shrink to decrease the amount of wires I am using by wiring in the following way below, but why wouldn't this work correctly? Am I missing something? Does this have anything to do with wiring in parallel vs series? ::slight_smile:

Get a multimeter. You don't have to spend a fortune on a top professional brand. £10~£15 on a branded model such as Uni-t is fine, will last many years (one of my Uni-t is 20 years old and is beginning to show its age now) and is useful for other household stuff as well as electronics. Don't spend extra on a clamp meter, but leads with probes and leads with crock clips are useful.

I can see no difference between the wiring in your 3 diagrams, they look equivalent to me, so there must be some other factor causing the difference. Maybe post more pictures. Can't see how the 3rd picture saves any wiring.

PaulRB:
Can’t see how the 3rd picture saves any wiring.

I was just wondering if all three pictures were equivalent because I want to avoid using a breadboard in the actual build. But for some strange reason, I get different results.

androidftw:
I want to avoid using a breadboard in the actual build.

As you should. Breadboards are for prototyping only. They are not robust for long term use. You could use stripboard or some other type of proto-board to solder up your final build.