Skip to content

Commit

Permalink
sample: add sample firmware template
Browse files Browse the repository at this point in the history
  • Loading branch information
and3rson committed Feb 24, 2024
1 parent b2a63c4 commit 2c488e5
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
14 changes: 14 additions & 0 deletions firmware/sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Зразок прошивки для Лілки
=========================

Це - мінімальний зразок програми, яку ви можете використати як шаблон для створення власної прошивки для Лілки.

Вона використовує PlatformIO.

Інструкцію з прошивання Лілки з використанням Visual Studio та PlatformIO можна прочитати [ось тут](https://lilka.readthedocs.io/uk/latest/manual/environment.html).

Крім того, цю прошивку можна зібрати та записати в Лілку за допомогою консолі:

```sh
pio run -t upload
```
11 changes: 11 additions & 0 deletions firmware/sample/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
; Це - конфігураційний файл PlatformIO. Він використовується для налаштування проекту та його залежностей.
; Докладніше про конфігурацію PlatformIO можна прочитати тут: https://docs.platformio.org/en/latest/projectconf/index.html

[env:default]
; Підтримка Лілки v2 ще не включена в офіційний реліз, тому поки що використовуємо коміт, який містить необхідні зміни
; platform = espressif32
platform = https://github.com/platformio/platform-espressif32.git#9b0c95d4a737683370a8e3e1cd5ffd07590ccb28
board = lilka_v2
framework = arduino
lib_deps =
lilka
10 changes: 10 additions & 0 deletions firmware/sample/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <lilka.h>

void setup() {
lilka::begin();
}

void loop() {
lilka::ui_alert("Привіт!", "Це - тестове повідомлення.");
lilka::ui_alert("Привіт!", "А це - ще одне тестове повідомлення.");
}

0 comments on commit 2c488e5

Please sign in to comment.