Hello All,

I have a GPS chip giving out a 2 decimal place speed value (eg. 13.40).

I simply need digit = 1, digit 2 = 3 and digit 3 = 4.

I have seen many 'solutions' but none have worked...

Any help would be amazing

The relevant part of code so far:

boardspeed = gps.speed.mph();

speedv = (boardspeed + 0.005) * 100 ;

digit1 = speedv/1000;

digit2 = speedv%1000/100;

digit3 - speedv%100;

Speedv is the boardspeed x 100 to remove decimals.