Skip to content

Setup

Purpose

The setup routine initializes REVA after power-up.

It prepares all hardware resources before entering normal operation.


Responsibilities

  • Initialize peripherals.
  • Configure Timer1.
  • Configure Timer2.
  • Load EEPROM parameters.
  • Initialize the OLED display.
  • Configure button inputs.

Execution Sequence

Power Applied
      ↓
setup()
      ↓
Load EEPROM
      ↓
Configure Timer1
      ↓
Configure Timer2
      ↓
Initialize OLED
      ↓
Initialize Buttons
      ↓
Enter loop()

Characteristics

Setup executes only once.

After initialization, control is transferred to the main loop.