Imas i ovo:
http://public.bn1.livefilestor...BHrkd1JMC-ykW7I/TachFilter.JPG
Cini mi se da je za truncicu prostije od ostalih, nema tranzistora niti integralnih kola.
Procitao sam "Uno" na jednoj semi sto si okacio, jel to za Arduino?
Ako jeste, evo ga i kod:
Code:
#include <LiquidCrystal.h>
volatile byte rpmcount;
unsigned int rpm;
unsigned long timeold;
LiquidCrystal lcd(12, 13, 11, 10,9,8,7);
void rpm_fun()
{
//Update count
rpmcount++;
}
void setup()
{
attachInterrupt(0, rpm_fun, RISING);
rpmcount = 0;
rpm = 0;
timeold = 0;
}
void loop()
{
delay(200); // Sample Time
detachInterrupt(0);
rpm = (millis() - timeold) / rpmcount;
rpm = 1000/rpm;
rpm = (rpm / 3) * 60; // Six Cyl - 3 PPR
timeold = millis();
rpmcount = 0;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(int(rpm)); // print rpm
//Restart the interrupt processing
attachInterrupt(0, rpm_fun, RISING);
}