Hi There,
I am still a newby at this
I have found a sketch for a tacho (rpm counter)
and got it to work quite well then i found a good load cell sketch
and added it to my tacho sketch and it also works well
but now the tacho doesn't work and i cant work out why
I have attached the sketch
and it would be great if somebody can help me
but now the tacho doesn't work and i cant work out why
Gee, I can't imagine why.
void loop()
{
//Update RPM every second
//delay(1000);
//Don't process interrupts during calculations
detachInterrupt(0);
Unless maybe the fact that you detached the interrupt handler has something to do with it. Why on earth would you do that?
To prevent the interrupt from firing while you copy data, detaching and (never) reattaching the handler is NOT the way to do that. interrupts() and noInterrupts() is the proper way.
Do you really think that code after the return statement is ever going to be executed?
Even if the statement were in the correct place in the mapFloat() function, the mapFloat() function has NOTHING to do with interrupts, so attaching an interrupt handler in the function is stupid.