I am somewhat new to Arduino, sensors and electronics so I wanted to gather some ideas for sensor options for a project I am working on. I would like to be able to track direction of a bike by mounting some type of sensor onto the handlebars of a bicycle. What kind of sensor do you guys think would be most effective for tracking this data?
**** EDIT/MORE INFORMATION **** I would like the sensor to track the rotation, or angle, of the handlebars relative to the frame of the bicycle and output some values I can scale (likely between -180 to 180 degrees). If this is relevant at all, the bike itself would be made stationary allowing only for movement from the handlebars' rotation and for pedaling to spin the back wheel to track speed.