Skip to content

Push Button Interface

Overview

The Push Button Interface allows users to navigate a settings menu, view system information, and perform actions such as factory reset, firmware rollback, and device reboot. This interface utilizes a single physical push button, replacing the previous touch-based system. Interactions are based on single presses, long presses, and potentially double presses.

Features

  • Navigate Settings Menu: Cycle through available options.
  • Select/Confirm Actions: Execute the highlighted menu item.
  • Access System Information: Display firmware version or other relevant data.
  • Perform System Actions: Initiate reboot, factory reset, or firmware rollback.

Button Interactions and Menu Navigation

The system uses different types of button presses to control the interface:

  • Single Press: Typically used to navigate to the next item in a menu or increment a value.
  • Long Press (e.g., >2 seconds): Used to select an option, confirm an action, or enter/exit a settings mode.
  • Double Press (if implemented): Could be used for alternative actions like moving backward in a menu or toggling a specific mode.

The primary interaction model revolves around a settings menu displayed on the OLED screen.

General Menu Operation:

  1. Entering Settings Mode: A specific button action (e.g., a long press from the main screen) activates the settings menu.
  2. Navigating: Single presses cycle through the available menu options. The current selection is highlighted on the display.
  3. Selecting: A long press on a highlighted menu item executes the corresponding action or enters a sub-menu/value adjustment mode.

Available Settings and Actions

Based on common device functionalities and previous interface capabilities, the button interface likely controls the following (actual options may vary based on firmware implementation):

Action / Setting Triggered By (Example) Description
Display Info Short Press (main) Cycle through status screens (e.g., Wi-Fi/LTE status, sensor readings).
Enter Settings Menu Long Press (main) Activates the main settings menu.
Next Menu Item Single Press (menu) Moves to the next option in the current menu.
Select Menu Item Long Press (menu) Activates the selected menu item (e.g., enters a sub-menu or initiates an action).
Reboot Device Menu Option Navigated to via single presses, confirmed with a long press. The device will restart.
Factory Reset Menu Option / Combo Navigated to via single presses, confirmed with a long press. Resets all settings to their default values.
Firmware Rollback Menu Option / Combo Navigated to via single presses, confirmed with a long press. Reverts to the previous firmware version.
Toggle Setting Menu Option For binary settings (On/Off), a long press might toggle the value.
Adjust Value Menu Option For settings requiring value input (e.g., tank levels), entering this option might allow single presses to increment and another action (e.g., double press or cycling through) to decrement, with a long press to confirm.

The exact button press patterns (single, double, long, duration) and menu structure are defined in the firmware (main.ino, OLED.ino). Refer to the source code for precise implementation details.


System Actions via Button

System Reboot

  • Accessible through the settings menu.
  • Navigate to "Reboot" and confirm with a long press.
  • The device will display a "REBOOTING" message and then restart.

Factory Reset

  • Accessible through the settings menu or potentially a special button combination on startup.
  • Navigate to "Factory Reset" and confirm with a long press (often with an additional confirmation step).
  • This action erases user-configured settings and restores defaults. The device may reboot automatically.

Firmware Rollback

  • Accessible through the settings menu.
  • Navigate to "Rollback FW" and confirm with a long press.
  • The device will attempt to revert to the previously installed firmware version if available. The OLED display should indicate the status of this process.

OLED Display Feedback

The OLED screen is crucial for the button interface, providing visual feedback for:

  • Current menu item / selection.
  • Values being adjusted.
  • Confirmation prompts.
  • Status of actions (e.g., "REBOOTING", "RESETTING...", "ROLLBACK FAILED").
  • Firmware version and other system information.