36. System for Measurement Unit Configuration

There is a device that measures the following parameters. It provides readings in the preferred unit system as follows

  • Temperature: Celsius, Fahrenheit
  • Distance: Kilometers, Miles
  • Weight: Kilograms, Pounds
  • Volume: Liters, Gallons

Where users can select their preferred unit e.g. Temperature- Celsius, Distance- Miles, etc. 

Create a system to change unit preferences and save the preferences such that they will be retained even if the device restarts/ powered OFF. 

Also, the user will have the option to restore it to the default factory setting. 

Video

Note: We only have to implement unit preference saving functionality as shown in the video.

  1. This is the first output on the serial monitor listing out saved preferences.


         2. Then it must ask the user to set/change the preferences.

         3. It must accept the changes from the user and update the EEPROM.

 

Submit Your Solution