How to compile rpm sensor and various sensors and outputs

Hi, I am attempting to use a tacho code, and inputs from sensors switching relays, and using serial communication with a nextion display.
I can get the everything to work, all sensors/ values to read on the nextion gauge setup, but I cant get the tach / rpm code to work at all at the same time.
My question is, is there a way to compile the codes together?
I have read the how to write code for several things at once, and haven't had any luck with it.
I have attempted to use two arduinos, one ( uno ) dedicated to running the rpm sensor and code, and assigning analogWrite, and a mega, running the rest of the sensors, outputs etc, and using analogRead to attempt to get the rpm signal.
This is the first time i have had anything to do with programming/ arduinos etc...
Hoping someone can give me pointers, or some kind of direction as to how I should go about it..
Attached are the two codes I have been using.
Also, I need to be able to switch outputs in the turbine control code at different RPM, what variable / value in the rpm sensor code would i use?
Although once the rpm is working in the turbine code that will be easy enough i guess..?
Thanks in advance!
Dan

Turbine_Control30.ino (9 KB)

rpm_sensor.ino (1.54 KB)

1 Like

I haven't included the analog write / read sections of the code that I was trying to use, as they didn't work at all, if it can work I clearly didn't do it right so thought better to leave it out, and just post the parts that do work..

No help? aww..
I'm going to make a pwm to analog convertor and try it that way..
If there is any insight or tips, I'd appreciate it. maybe I posted in the wrong section? not enough info??