An RPM counter that uses the audio jack as input
To compile this project you will need a machine running Linux, Windows or macOS and the latest flutter framework.
This project depends on:
sound_stream
from casperpas link here.markdown
from dart.dev link here.flutter_widget_from_html
from daohoangson.com link here.in_app_purchase
from flutter.dev link here.shared_preferences
from flutter.dev link here.permission_handler
from baseflow.com link here.flutter_svg
from dnfield.dev link here.provider
from dash-overflow.net link here.path_provider
from flutter.dev link here.mic_stream
from Aaron Alef link here.cupertino_icons
from flutter.dev link here.google_fonts
from material.io link here.
I have just tested it on a Galaxy A40 and Galaxy S10 (Hong Kong version). No further testing has been performed. I expect it to work pretty well on any other device that supports flutter, as it uses pretty standard packages, as well as on iOS devices, as long as it has a headphone jack. It should work also over bluetooth, but you'd need to send the pulses through bluetooth audio, maybe picking a cheap bluetooth broadcaster through Amazon, like this ones:
This is NOT and endorsement for ANY product, nor any recommendation whatsoever. This should IN THEORY work, though.
Sadly I don't own any iOS device, so unless you can give me one, I won't be able to test it for you.
My bike sends the information through an audio jack cable. Each time a revolution is performed, an audio pulse is sent through the headphone jack. We receive the input from the mic using sound_stream
and count how many peaks are reached per second. The information will be passed to a method that will turn those numbers into revolutions/minute (RPM).
As simple as that.