Client side software is a web page downloaded from "localhost" web server.
The browser interface shows a Google Maps  viewport that allows user to select a path by clicking over two points.

 

After the user confirms the path, a javascript code requests geocode info to Google Maps API server and memorizes all nodes and the relatives data such as latitude, longitude and elevation. These scripts calculate both the distance between the points and the inclination. Theb the vieport switches to Street View mode.

 

While the user rides the bike the microcontroller reads the pedaling cadence and, working as an HID, sends a click train with a frequence proportional to the cadence.
When the Google Street View viewport receives a click moves forward to next frame of the path.
Each time viewport moves to next frame the inclination of the path is calculated as difference of currente frame quote and previous frame quote divided by the distance between frames.
An Ajax client connects to web server ad sends the inclination info as a GET parameter to a server side page that store it in a database in order to made it accessible to microcontroller via an UDP connection.

 

 

A bike fit on a home trainer and equipped with a display showing a Street View which proceeds according to the pedalling pace. While riding, the incline is calculated and the brake torque is activated to simulate the slope.
The microcontroller is based on Arduino hardware.

facebook twitter google+ youtube flickr

And the winner is ...
Focus award

Meet Belluzzi Gooble Bike
at Maker Faire Rome
Maker Faire Europe Rome