This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:examples [2010/03/01 20:25] – priitj | en:examples [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Examples ====== | + | ====== |
- | {{ :images:book: | + | {{ :kit:kodulabor3_komponendid_v.png?600 |}} |
- | Practical examples are built up in uniform style and as concrete as possible. Each example begins with a short introduction of the theory and gives necessary knowledges for completing the following practical part. Practical part contains commented example of the source code of the software. Generally the library of the HomeLab is used in the example of the code, but at some cases the registers are also configured. The first chapter is a little bit different | + | Practical examples are built up in uniform style and as concrete as possible. Each example begins with a short introduction of the theory and gives necessary knowledges for completing the following practical part. Practical part contains commented example of the source code of the software. Generally the library of the HomeLab is used in the example of the code, but in some cases the registers are also configured. The first chapter is a little bit different |
- | ~~PB~~ | + | < |
**Buildup** | **Buildup** | ||
Line 19: | Line 19: | ||
**Basic software of the examples** | **Basic software of the examples** | ||
- | As mentioned before, practical code samples are composed on the basis of the library of the HomeLab. There are most used specific AVR operations and procedures connected with the HomeLab’s modules written in the library. The usage of the library means that the user does not have to write a hardware | + | As mentioned before, practical code samples are composed on the basis of the library of the HomeLab. There are most used specific AVR operations and procedures connected with the HomeLab’s modules written in the library. The usage of the library means that in order to start the modules |
**Code style of the examples** | **Code style of the examples** | ||
Line 25: | Line 25: | ||
The example programs are written in one style, to achieve more synoptic program code. Uniform style makes the program more readable and prevents making simple syntax mistakes. It is advised to follow a certain style when making exercises. The main characteristics of the style: | The example programs are written in one style, to achieve more synoptic program code. Uniform style makes the program more readable and prevents making simple syntax mistakes. It is advised to follow a certain style when making exercises. The main characteristics of the style: | ||
- | * Program, all its functions and variables are in English and in small letters the words are separated with an under-strike. | + | * Program, all its functions and variables are in English and in small letters, the words are separated with an under-strike. |
* Functions are in following form: // | * Functions are in following form: // | ||
* more important places in the program are commented. | * more important places in the program are commented. | ||
* Every block in C-language (marked with { and } )starts and begins in separate row. | * Every block in C-language (marked with { and } )starts and begins in separate row. | ||
* Blocks are tabulated with tabulator keys. Tabulator is not used inside rows. | * Blocks are tabulated with tabulator keys. Tabulator is not used inside rows. |