This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| et:examples:sensor:encoder [2015/03/03 14:10] – raivo.sell | et:examples:sensor:encoder [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~PB~~ | + | < |
| ====== Kooder ====== | ====== Kooder ====== | ||
| Line 44: | Line 44: | ||
| // Koodrite arv | // Koodrite arv | ||
| #define NUM_ENCODERS 2 | #define NUM_ENCODERS 2 | ||
| - | // Koodri | + | |
| + | // Koodri | ||
| #define ENCODER_TICKS (F_CPU / 8 / 256) | #define ENCODER_TICKS (F_CPU / 8 / 256) | ||
| Line 112: | Line 113: | ||
| } | } | ||
| - | // Koodri | + | // Koodri |
| unsigned short encoder_get_pulses(unsigned char index) | unsigned short encoder_get_pulses(unsigned char index) | ||
| { | { | ||
| Line 158: | Line 159: | ||
| // Teksti moodustamine. | // Teksti moodustamine. | ||
| - | sprintf(text, | + | sprintf(text, |
| lcd_gfx_goto_char_xy(0, | lcd_gfx_goto_char_xy(0, | ||