Skip to content

Instantly share code, notes, and snippets.

@kazemito
Last active June 13, 2023 11:07
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazemito/5b9b6ea980c27f60b6d9f68592b36589 to your computer and use it in GitHub Desktop.
Save kazemito/5b9b6ea980c27f60b6d9f68592b36589 to your computer and use it in GitHub Desktop.
Arduino Quick Shifter without Display and Need to Reupload the code if you want to adjust the values
/*
* KazeShifter Arduino Adjustable Open Source Quick Shifter
* Copyright (c) Muhammad Tresna Mukti
* created by : Muhammad Tresna Mukti aka Kazemito Haruhi
* Last Updated : March 2, 2020 Indonesia Time (GMT+07:00)
*
* For more information about this code, Go to link below
* YouTube : https://www.youtube.com/c/KazemitoHaruhi/
* Instructables : https://www.instructables.com/member/TresNaa/
*/
int cutoff=70; // Set Engine Cutoff time (If you're using relay, do not set timing under 40ms)
int dly=0; // Set Delay time before next Upshift
int i=0;
void setup() {
pinMode(2, INPUT_PULLUP); // Sensor pin
pinMode(5, OUTPUT); // Relay Pin
pinMode(6, OUTPUT); // LED pin
digitalWrite(5, HIGH); // Set Relay on High State
digitalWrite(6, HIGH); // Turn on LED
}
void loop() {
int snsrstate=digitalRead(2);
if (snsrstate==HIGH) {
i=0;
delay(50);
}
if (snsrstate==LOW && i==0) {
i+=1;
digitalWrite(5, LOW);
digitalWrite(6, LOW);
delay(cutoff);
digitalWrite(5, HIGH);
digitalWrite(6, HIGH);
delay(dly);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment