# Microbit speedometer

**URL:** <https://forum.makecode.com/t/microbit-speedometer/18245>\
**Category:** micro:bit\
**Created:** [March 3, 2023, 10:57pm UTC](https://forum.makecode.com/t/microbit-speedometer/18245 "2023-03-03T22:57:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MK97-2007](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mk97-2007/32/1603_2.png) [@MK97-2007](https://forum.makecode.com/u/MK97-2007)\
**Post date:** [March 3, 2023, 10:57pm UTC](https://forum.makecode.com/t/microbit-speedometer/18245/1 "2023-03-03T22:57:45Z")

</div>

Hello  
I am using my microbic V2 to control a vehicle. I need to measure the speed of the vehicle. I know there is no GPS, but I can use the accelerometer to get approximate speed. But I don’t know how. I looked up on the internet and found the formula: v = a \* t \* 0.036  
The problem is that I don’t know with the t (time), when it should run continuously and show the speed or did I get the completely wrong formula?

---

<div class="post-metadata">

**Author:** ![GrandpaBond](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/grandpabond/32/10835_2.png) [@GrandpaBond](https://forum.makecode.com/u/GrandpaBond)\
**Post date:** [January 2, 2024, 7:17pm UTC](https://forum.makecode.com/t/microbit-speedometer/18245/2 "2024-01-02T19:17:00Z")

</div>

Unfortunately an accelerometer can only sense acceleration (the inertial force felt when the velocity changes). Moving at a constant speed gives a zero reading. The best way to measure speed is to fit a rotation sensor to your wheels. This may deliver an angle directly, or you may need a sensor counting pulses as the spokes of a wheel go by.  
The change in angle will give you the distance travelled (multiply by the circumference), and dividing by the elapsed time will give you the average speed. Keep repeating your measurements for a continuous readout. You might like to look at the new “meters” extension to show your speed in cm/sec as a 2-digit readout.
