Text this: Development of speed detector algorithm for motorcycle safety device