Slot machine spin down rate

Thought I would try to emulate a slot machine wheel. I know it starts out fast and slows gradually simulating friction, and then when almost on a number, it could pass it to the next or slip back to the first number. I would use a single digit 7 segment LED/LCD display.

Not sure of all the math involved? Could someone help?

  1. initialize it with a random speed;
  2. exponentially decay it down to a threshold; keep count of how long it takes to go down to that threshold;
  3. random generate a number between 0..1;
  4. if that number if >= 0.5, round up / or down the count;
  5. all the time, display that count.

It should be fairly simple.

Thanks you, that's what I needed, a bit of shove in the right direction. :slight_smile: