I need help with coding a car cruisecontrol and Arduino Leonardo (HID)?
I have a car cruise control lever I want to connect to an Arduino Leonardo and have it act like a keyboard (HID).
It has only two wires, 3 push buttons and one toggle switch. I do know the input voltage is 5 volt and every button has its own resistor causing different voltages to come out when used. This way the car computer knows what has been pressed.
I have 3 switches:
1: Acc (Cruise Control Accelerate speed)
2: Ret (Cruise Control Retrieve speed)
3: Res (Cruise Control Resume from last speed)
I have one toggle Switch:
I want the ON/OFF to toggle a keyboard character "C" when used.
I want button 1 to send a "7"
I want button 2 to send an "8"
I want button 3 to send a "9"
The code should pause after each change (no loop). The 10k Restistor is a pull-up resistor for debounce.