Clone
4
Smaage-Software
jannes edited this page 2025-05-16 21:01:46 +00:00

HOME

Arduino Code

There are classes for ADC (NAU7802), Display, BLE, SettingsStorage, Modes, Menus, and Views to manage their respective tasks.

Setup

  • Initialize BLE
  • Initialize ADC
  • Initialize Display (show logo)
  • Link Buttonactions
  • Enter Default/Configured Mode

Modes

Modes are procedures that require an own implementation of a arduino loop. Tasks that do not require user interaction (button clicks) are just actions.

The Smaage have different modes:

  • Weighing
  • Menu
  • Recipe Management
    • Add Recipe
    • Move Recipe Up/Down in order
    • Remove Recipe
    • Edit Recipe
  • Set Default Recipe
  • BLE Pairing

For all Modes: if there is a BLE connection, the current readings are transmitted.

Weighing

Displays the current weight by numbers.

Available Actions

  • Tare
  • Enter Menu
  • Enter BLE Pairing
  • cycle recipes
  • start timer

Loop

Loop Diagram

Menu

One can select one of the following by moving up, down, and enter

  • Calibration
  • Switch Units
  • Recipe Management
  • Set Default Recipe
  • Back (Enter last weighing mode)

Available Actions

  • Move Up/Down
  • Enter

Loop

Recipe Management (Menu)

One can select one of the following by moving up, down, and enter

  • Move a Recipe Up/Down
  • Enter a Recipe View
  • Add a Recipe
  • Back (Enter Menu)

Available Actions

  • Enter
  • Move Up/Down
  • Select Item

Loop

Recipe View

One sees the recipe steps, can modify these, edit the name, duplicate, and delete this recipe.

Available Actions

  • Enter
  • Move Up/Down
  • Select Item

Loop

Edit View

Depending on the Value type, one can change the value, and confirm the changes.

Available Actions

  • cycle through available options
  • Enter (which saves the settings and goes back)

Loop

Set default Recipe

Select an existing or no recipe by the edit view

BLE Pairing

Loop

BLE Interface