budzique
Member
- Joined
- Jun 28, 2020
- Messages
- 77
- Reaction score
- 72
- Points
- 18
Hi friends, so I'm currently working on a memory module for the drive mode selector. So far this will cost less than $50 with some assembly required.
DISCLAIMER: This is very technical and requires soldering and tapping into wires
So here we go. as far as parts required here's the list:

You'll want to code (see below) the arduino before wiring it into your car.
DISCLAIMER: This is very technical and requires soldering and tapping into wires
So here we go. as far as parts required here's the list:
- Arduino Nano [A000005]
- 2x 5V diode [1N5339B]
- 12V to 5V buck converter (I haven't decided on a part here yet)
- 4x Positaps
- A few lengths of wire. (prefer red, black, green and yellow for identification)

You'll want to code (see below) the arduino before wiring it into your car.
C++:
#include <EEPROM.h>
int memAddress = 0;
int memSetupAddr = 1;
const byte SMARTMODE = 0;
const byte ECOMODE = 1;
const byte COMFORTMODE = 2;
const byte SPORTMODE = 3;
const byte CUSTOMMODE = 4;
byte currentMode;
bool startup = true;
void setup() {
pinMode(2, INPUT); // clockwise
pinMode(3, INPUT); // counterclockwise
pinMode(4, OUTPUT); // clockwise
pinMode(5, OUTPUT); // counterclockwise
if (EEPROM.read(memSetupAddr) != 1) {
EEPROM.write(memAddress, COMFORTMODE);
EEPROM.write(memSetupAddr, 1);
currentMode = COMFORTMODE;
} else {
currentMode = EEPROM.read(memAddress);
}
}
void loop() {
if (startup){
switch(currentMode){
case SPORTMODE:
clockWise(1);
break;
case CUSTOMMODE:
clockWise(2);
break;
case SMARTMODE:
counterClockWise(2);
break;
case COMFORTMODE:
case ECOMODE:
default:
break;
}
startup = false;
}
if (digitalRead(2) == LOW){
currentMode++;
EEPROM.write(memAddress, currentMode);
}
if (digitalRead(3) == LOW){
currentMode--;
EEPROM.write(memAddress, currentMode);
}
}
void clockWise(int num){
for(int i=0;i<num;i++){
digitalWrite(4, LOW);
}
}
void counterClockWise(int num){
for(int i=0;i<num;i++){
digitalWrite(4, LOW);
}
}