mirror of
https://github.com/anatolykopyl/longboard-speedometer.git
synced 2026-03-26 12:54:27 +00:00
Explained a thing
This commit is contained in:
@@ -182,6 +182,10 @@ void loop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void update_speed() {
|
void update_speed() {
|
||||||
|
/*
|
||||||
|
* Dividing by two because reed switch gets triggered twice a rotation
|
||||||
|
* You probably won't need that if you opt for a hall sensor
|
||||||
|
*/
|
||||||
dist = CIRCUMF * rotations / 2;
|
dist = CIRCUMF * rotations / 2;
|
||||||
speedKMH = dist * 3.6 / (WAIT / 1000);
|
speedKMH = dist * 3.6 / (WAIT / 1000);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user