Close

Software Architecture

A project log for LeOn - for Cats

A simple robot-toy for my cat Bastet.

andrei-gramakovAndrei Gramakov 10/25/2023 at 19:190 Comments

Before coding, let’s decide on the Software Architecture. Based on my previous decision, I’m going to have two main parts:

Each part will have a high-level and a low-level logic. I will use two terms, movement - for transportation in space, and motion - for any other physical activities. In total, we will have:

To break the direct dependency, Controller→Driver let’s use a Hardware Abstraction Layer Interface, so we will have a dependency on a stable interface rather than on a driver that can be changed in the future:

ControllerHALDriver

By doing so, we isolate the high-level logic of hardware changes.

Let's introduce two more terms:

The resulting architecture looks this way:

The next steps will be:

  1. Find/Develop appropriate interfaces
  2. Implement HAL mocks
  3. Implement the Software
  4. Find appropriate drivers
  5. Implement HAL

Discussions