ECU RPM control module. DR3 Board

Hello new here and basically new to the whole coding of this nifty little thing and just coding in general. I have developed something which I know isn't a working title yet. But basically I would Like to develop an RPM control block, using the ardrunio to make modifications to the ECU, so that when I install the piggyback I can adjust timing respectively. And I would like this to apply to a mitsubishi ECU OR any Stock ECU for that matter, main reason is this (if you don't already know). Is when you modify AFR's on any vehicle the car will adv, or Retard timing respectively to the amount of fuel and air you are changing, pull fuel and the engine will retard, add fuel and she will advance. What I want to do is counteract what I will be using this product is called a SAFC. which Is a highly simple piggy back. But due to AFR changes being made with the SAFC you result in the timing issues associated with it. It's annoying but If i can intercept the timing signal and false it's voltage this would be good.

This is what I have so far probably way off but I don't know how t code yet so if someone could give me a hand I could possibly give you a small amount of my money in return. thank you. :)


//RPM Controller to remove timing ADV + RET during AIRFLOW changes. //Do Not make adverse chhanges.

//Pin Map

define PinRPMin 4 // Pin for RPM SIG 1

define pinRPMout 5// Pin Coil RPM SIG 2

define MAXRPM 9000 // MAX RPM ALLOWED

volatile unsigned long sparkstartTime = 0; //The first result from ECM volatile unsigned long SparktakeOne = 0; //Time taken to revolve exact - one volatile unsigned long sparkactionProduce = 0; //The Result?

int filter1;

void setup () {

configPage2.Revlimit = 75; // *100 = 7500RPM

pinMode (pinRPMin, OUTPUT); pinMode (pinRPMout, OUTPUT); digitalWrite(PinRPMout, HIGH); }