Skip to content

Commit abcfac2

Browse files
committed
english readme
1 parent 3d6ffef commit abcfac2

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed

README_EN.md

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
This is an automatic translation, may be incorrect in some places. See sources and examples!
2+
3+
# Looper
4+
Easy pseudo-test event-oriented framework for Arduino
5+
- a more convenient organization of the program
6+
- division into virtual flows
7+
- Static and dynamic creation of tasks
8+
- calling tasks with a given period
9+
- Sending events and data between tasks
10+
- General execution in one stream without need for mittexes
11+
- Convenient API to create your tasks and integrate with other classes
12+
- Easy to unleash the arduino nucleus (replace two functions)
13+
- without dependencies on other libraries
14+
- lightweight: the core occupies 1 KB flash drive and 30 B RAM (AVR)
15+
16+
## compatibility
17+
Compatible with all arduino platforms (used arduino functions)
18+
19+
## Documentation
20+
Located in [DOCS folder] (https://github.com/gyverlibs/looper/tree/main/docs/0.main.md)
21+
22+
## Content
23+
- [versions] (#varsions)
24+
- [installation] (# Install)
25+
- [bugs and feedback] (#fedback)
26+
27+
<a id="usage"> </a>
28+
29+
## Why do you need a looper
30+
Classic Arduino project, not based on operating systems like Freertos, has an architecture of a single -flow super -cycle (*POOL BASED*): There is a main `loop` cycle, which is performed in a circle throughout the work of the program and in this cycle we interview buttons/sensors/communications/communication/Other.Such survey functions in the terminology of this library are called "tickers."To initialize some entities, the code is also placed in `setup` to execute once before launching the main cycle.
31+
32+
When developing a large multi -file project, you have to drag tickers of various blocks of the program from different files in the main LOOP, and the initialization functions for calling in Setup are also drawn with them, and global variables are created for interaction between files and blocks.For tasks that are called with a certain period (for example, once per second), software timers are written and also placed in LOOP for a constant test of time.
33+
`` `CPP
34+
VOID setup () {
35+
Disp_init ();
36+
Sensor_init ();
37+
wifi_init ();
38+
}
39+
40+
VOID loop () {
41+
Sensors_Tick ();
42+
buttons_tick ();
43+
}
44+
`` `
45+
46+
This library solves all these problems:
47+
- Adding tickers to the common to LOOP from any end of the program without connecting to the main executable file
48+
- Creation of additional "virtual" setup and loop, encapsulated in separate files
49+
- dynamic creation and removal of tasks during the work of the program
50+
- Sending and receiving events through the entire program
51+
- built -in timer for a periodic or postponed call of tasks
52+
53+
> This allows you to divide the program into completely independent flows, as well as write code in an event-oriented style
54+
55+
Cons:
56+
- Each task occupies 7 bytes in RAM
57+
- the passage along the list of tasks and calling the handlers occupies in the region of 8us per task (AVR 16MHz), which is tantamount to two calls of DigitalRead
58+
59+
<a id="versions"> </a>
60+
61+
## versions
62+
- V1.0
63+
64+
<a id="install"> </a>
65+
## Installation
66+
- The library can be found by the name ** looper ** and installed through the library manager in:
67+
- Arduino ide
68+
- Arduino ide v2
69+
- Platformio
70+
- [download library] (https://github.com/gyverlibs/looper/Archive/Refs/Heads/Main.zip) .Zip archive for manual installation:
71+
- unpack and put in * C: \ Program Files (X86) \ Arduino \ Libraries * (Windows X64)
72+
- unpack and put in * C: \ Program Files \ Arduino \ Libraries * (Windows X32)
73+
- unpack and put in *documents/arduino/libraries/ *
74+
- (Arduino id) Automatic installation from. Zip: * sketch/connect the library/add .Zip library ... * and specify downloaded archive
75+
- Read more detailed instructions for installing libraries [here] (https://alexgyver.ru/arduino-first/#%D0%A3%D1%81%D1%82%D0%B0%BD%D0%BE%BE%BE%BED0%B2%D0%BA%D0%B0_%D0%B1%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA)
76+
### Update
77+
- I recommend always updating the library: errors and bugs are corrected in the new versions, as well as optimization and new features are added
78+
- through the IDE library manager: find the library how to install and click "update"
79+
- Manually: ** remove the folder with the old version **, and then put a new one in its place.“Replacement” cannot be done: sometimes in new versions, files that remain when replacing are deleted and can lead to errors!
80+
81+
<a id="feedback"> </a>
82+
83+
## bugs and feedback
84+
Create ** Issue ** when you find the bugs, and better immediately write to the mail [[email protected]] (mailto: [email protected])
85+
The library is open for refinement and your ** pull Request ** 'ow!
86+
87+
When reporting about bugs or incorrect work of the library, it is necessary to indicate:
88+
- The version of the library
89+
- What is MK used
90+
- SDK version (for ESP)
91+
- version of Arduino ide
92+
- whether the built -in examples work correctly, in which the functions and designs are used, leading to a bug in your code
93+
- what code has been loaded, what work was expected from it and how it works in reality
94+
- Ideally, attach the minimum code in which the bug is observed.Not a canvas of a thousand lines, but a minimum code

0 commit comments

Comments
 (0)