Hutkikz:
Change this:Serial.println(1000000*60/(cur_t-t));//print the rpmto this:
RealRPM = (1000000*60/(cur_t-t));//save the rpm
Just changing that doesnt deal with declaring variables. Or where to put the hall effect code into the rest of the code which is what is going over my head.
In the Tutorial code, the A0 input is in the comment section while the HallTach code has it in the Setup portion. I think I having a bigger issue with knowing what I can delete from one and not from the other. Ive tried to mix them up multiple different ways and it wont compile as Im not declaring everything, but I dont think I should be declaring things twice.
Case in point
this is in the Tutorial Code
int sensorPin = A0; // Potentiometer pin to simulate an rpm sensor, for testing
and this is in the HallTach code
void setup()
{
Serial.begin(115200);
pinMode(A0,INPUT);
I think this is more about combining codes that dont necessarily work together than the RPM thing. I have figured out how to use the Tutorial code to run a temperature and fuel level gauge using ADC as its clear how to use it that way, but adding in new stuff is what is hanging me up.