The arduino is reponsible for reading the frequency from crankshaft position sensor, calculating the frequency using FreqMeasure Library from Paul Stoffregen and sending to Android app.

The Android app receives the data from bluetooth and draw the elements.

Earlier version:

Arduino code:

#include <FreqMeasure.h>

void setup() {
  Serial.begin(9600);
  FreqMeasure.begin();
}

void loop() {
  if (FreqMeasure.available()) {
    int frequency = FreqMeasure.countToFrequency(FreqMeasure.read());

    char s[5]; 
    sprintf(s,"%d;\0", frequency);
    
    Serial.write(s);
  }
}