Skip to content

Instantly share code, notes, and snippets.

@DDolphin
DDolphin / HallTacho.ino
Last active August 29, 2015 14:01
[Arduino]Hall sensor Tachometer
#include <Servo.h>
Servo indicator;
unsigned long start;
unsigned long length;
int rpm;
long rpma;
int out;
#include <TinyGPS++.h>
byte displayMode=1; //(mode 1~mode 5)
int displayNum;
byte pointDigit;
byte brightness=205;//the lower, the more bright
byte numPattern[10]={
B11000000,//0
B11111001,//1
#include <DS1307RTC.h>
#include <Time.h>
#include <Wire.h>
#define ClockPin 3 //595's clock
#define LatchPin 4 //595's latch
#define enablePin 5 //595's output enable (control the brightness of LEDs)
#define DataPin 6 //595's data input
#define buzzerPin 7 //buzzer
#include <Servo.h>
Servo myservo; // create servo object to control a servo
Servo myservo1;
int potpin = 0,potpin1=1; // analog pin used to connect the potentiometer
int val,val1; // variable to read the value from the analog pin
#include <Servo.h>
Servo myservo; // create servo object to control a servo
Servo myservo1;
int potpin = 0,potpin1=1; // analog pin used to connect the potentiometer
int val,val1; // variable to read the value from the analog pin