Digital Tachometer (Speed detection) Module

Specifications

Puzzle interface 
infrared photoelectric sensor 
Working voltage 3.3v-5v 
Output: digital switch output ( 0 and 1 )

 

Tachometer Speed Module for Arduino

Description:
The Puzzle - Tachometer is a simple module that allow you to test the speed of the motor.Widely used for motor speed detection, Pulse count, position limit, and so on.

Features
Puzzle interface
infrared photoelectric sensor
Working voltage 3.3v-5v
Output: digital switch output ( 0 and 1 )

Code:
 #include
unsigned int counter=0;
void blink()
{
 counter++;

void timerIsr()

   Timer1.detachInterrupt();  //disable the timer1
   Serial.print("The speed of the motor: "); 
   Serial.print(counter,DEC);  
   Serial.println("round/s"); 
   counter=0;  
   Timer1.attachInterrupt( timerIsr );  //enable the timer1
}
void setup() 
{
   Serial.begin(9600);
   Timer1.initialize(1000000); // set a timer of length 1sec
   attachInterrupt(0, blink, RISING);  //INT0
   Timer1.attachInterrupt( timerIsr ); // attach the service routine here

void loop()
{
  ;  //do nothing
}
Tachometer modules can be connected to the relay to form features such as Limit switches, you can also connect to the active buzzer module, consisting of alarm.

Package Included:
1 X Tachometer Speed Module