Using an old smartphone I had lying around as a bike computer.
As I have a 3D printer a printed a case for it with a lock I based on the garmin edge. At first I had it stem mounted as a top cap, but made a holder for it that I mounted to the top tube with double sided tape that I like better.