  * LiquidMenu library - hello_menu.ino
  *
  * This is the get started example demonstrating how to create
- * a menu of 2 screens with dynamically changing information.
+ * a menu of two screens with dynamically changing information.
+ *
+ * The first screen shows some static text. The second screen
+ * shows the reading of analog pin A1. To display a changing
+ * variable on the LCD, simply put the variable in the LiquidLine
+ * constructor. In this case the LiquidLine object is "analogReading_ine"
+ * and the variable is "analogReading". This line is on the second
+ * screen. The value of the analog pin is read every second and if
+ * it has changed the display is updated with the new value. The
+ * menu cycles through its two screens every five seconds.
  *
  * The circuit:
  * https://github.com/VasilKalchev/LiquidMenu/blob/master/examples/hello_menu/hello_menu.png

LiquidCrystal lcd(LCD_RS, LCD_E, LCD_D4, LCD_D5, LCD_D6, LCD_D7);

/*
 * Variables 'analogReading1' and 'analogReading2' are later configured to
 * be printed on the display. 'lastAnalogReading1' and 'lastAnalogReading2'
 * are used to check if the variable has changed.
 */
const byte analogPin1 = A1;
unsigned short analogReading1 = 0;
unsigned short lastAnalogReading1 = 0;

const byte analogPin2 = A2;
unsigned short analogReading2 = 0;
unsigned short lastAnalogReading2 = 0;

/*
 * Variables used for periodic execution of code. The first one is the period
 * in milliseconds and the second one is the last time the code executed.
 */
unsigned int period_check = 500;
unsigned long lastMs_check = 0;

unsigned int period_next = 5000;
unsigned long lastMs_next = 0;

/*
 * LiquidLine objects represent a single line of text and/or variables

 * - LCD Cathode to ground
 * - ----
 * - some analog input to Arduino pin A1 (unconnected also works)
 *
 * Created July 24, 2016
 * by Vasil Kalchev
