Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cziter15 authored May 11, 2024
1 parent 2c50f75 commit 8d5f5e4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ flowchart TD
- Each component has init, postInit, and loop methods.
- Components can be marked for removal, and they will be safely released in the next tick.

## 📍 Utilities
## 📏 Utilities
![image](https://github.com/cziter15/ksIotFrameworkLib/assets/5003708/1b144cdf-e345-4865-8ae7-92f0eaf31992)

## 📍 Components
## 🔨 Components
![image](https://github.com/cziter15/ksIotFrameworkLib/assets/5003708/c27aba37-4e54-49f5-9ad5-97439e7baf33)

### ⚠️ Rules:
### 🔅 Rules:
- Components should be added in the app's **init** method, so they will be available for **postInit** methods. (you can add them later, in loop() but that's another case)
- The **init** method is the best place to add dependent components, setup initial pin values etc.
- The **postInit** method is the best place to obtain a weak pointer to another component by calling **findComponent**. This will handle cases when other components were added via init method.
Expand Down Expand Up @@ -103,7 +103,7 @@ bool PelletInfo::init()
}
```

## 📍 Application rotator
## 🔁 Application rotator
The library implements one very useful utility named ksAppRotator. This object can wrap application instantiation logic into something like carousel or rotator.

Typically the device hosts two applications. First application is running core device logic while the second one is dedicated to help the user with the device configuration.
Expand All @@ -112,10 +112,10 @@ Each application has it's own loop method taking care of all underlying logic. I

This is very flexible, because you can even raise fail (false) from application's init method and then go directly into the configuration mode (for example there's no WiFi credentials provided by the user).

## 📍 Compiler flags
## 🔣 Compiler flags
- Bare Arduino projects need to have `gnu++2a` enabled via `compiler.cpp.extra_flags=` option in the `board.txt` file.

## 📍 Custom RTTI
## #️⃣ Custom RTTI
- Use the KSF_RTTI_DECLARATIONS macro to provide proper runtime type information generation for proper casting of components.
- See ksConfigProvider.h for an example. Your application components should use this macro, otherwise the component finding mechanism won't work.

Expand All @@ -124,13 +124,13 @@ This is very flexible, because you can even raise fail (false) from application'
- Automatic modem sleep requires the DTIM to be set on the access point.
- The best value for was 3. It allows the ESP32 to go down from around 100mA to 20mA.

## 💞️ Dependencies
## 📑 Dependencies
- **It is highly recommended to use PlatformIO as it will automatically download dependencies!**

### 📍 Frameworks
### 🔡 Frameworks
- Arduino for ESP32 [ https://github.com/espressif/arduino-esp32 ]
- Arduino for ESP8266 [ https://github.com/esp8266/Arduino ]

### 📍 Libraries
### 🔡 Libraries
- PubSubClient [ https://github.com/knolleary/pubsubclient ]
- arduinoWebSockets [ https://github.com/Links2004/arduinoWebSockets ]

0 comments on commit 8d5f5e4

Please sign in to comment.