Hardware timer and interrupts issue
hello everyone, i started programming arduino , and i'm making project read rpm , speed of car using arduino uno. far got working speed value not show properly. have used 1 hardware counter , 2 interrupts in project. 1. timer 1 on pin 5 - count pulses car's ecu calculate speed. 2. int0 on pin 2 - read ignition pulse calculate rpm. 3. int1 on pin 3 - 5v in headlight switch control brightness of display (max729 7 seg 8 digit). i can proper reading rpm , brightness control working properly. here codes below. code: [select] #include <ledcontrol.h> // inputs: din pin, clk pin, load pin. number of chips ledcontrol display = ledcontrol(12, 10, 11, 1); //speedo----------------------------------------------------------- const int hardwarecounterpin = 5; const int sampleperiod = 1000; //in milliseconds const float pulsespermile = 4000; // pulses per mile toyota. other cars different. const float convertmph = pulsespermile/3600; unsigned int count; float mph; int kph; int...