Biking on Google Maps - Arduino Leonardo (32u4) - HID device

Cycling is a very popular sport, also thanks to the successful athlete Petr Sagan. Passionate cyclists roam our roads and paths. However, as the weather is not always good, not only a fan of bicycles would like to ride from the comfort of home. So today I am bringing a way to do this, say, the augmented reality of Google maps. At the beginning we will go through the necessary hardware resources for the project and in the next step we will discuss their functionality.

Hardware Components:
  • Arduino (32u4 CPU) Leonardo 
  • Magnetic reel switch 
  • 2x pushbuttons 
To use the system, the user must turn on Google Maps, select any site in the world and switch to Street View mode. This ensures a ready interface for interacting with the bike (Arduin). Any type of bicycle can be used. Classic, road, mountain, treadmill. A magnetic contact must be fitted on the pedal and the structure.

The main element of the system is the use of the Arduino Leonardo development board, which contains an ATmega32u4 microprocessor. This type of processor can control GPIO pins (like classic Uno) and keyboard and mouse, it is HID device (Human Interface device). As a result, we have completely different uses not only for our idea. The magnetic contact is used to record the rotation of the pedals by a full revolution. The program implements a simple counter which is incremented each time the pedals are rotated 360 °. Optical barrier can also be used.

When the counter overflows, a condition is made and an up arrow is sent to the computer, which moves the user a step forward on the Google map. The buttons are used to rotate the view sideways and remain active as long as the user holds them. The program implementation uses pullup and pulldown button engagement. When pullup resistors are not required, internal pullup resistors of Arduina are switched on. The functionality of both variants is identical.

Cycling can also be enriched by the use of VR headset in Google map. In addition to Google Maps, Street View also uses some other interesting web applications that you can try, especially interesting guess pages (the whole family can be involved):
  • GeoGuessr
  • Earth Picker
Discover Google maps, search for curiosities on maps of the world, visit sites you've always wanted to go to. Arduino with 32u4 processor can also be used for other interesting projects in style: Steering wheel, game pedals with relatively good resolution analog support, handbrake, control panels to simulators and games. The same processor also includes the Arduino Pro Micro, which fits into projects with fewer I / O pins.


Comments

Popular posts from this blog

Web scraper via Arduino & NodeMCU & ESP32

ESP32 control via UDP datagrams