This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:examples:sensor:lidar [2012/06/06 20:24] – mikk.leini | en:examples:sensor:lidar [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 76: | Line 76: | ||
| #include < | #include < | ||
| - | // | ||
| // Defining USART interface. | // Defining USART interface. | ||
| - | // | ||
| usart port = USART(0); | usart port = USART(0); | ||
| - | // | ||
| // Defining button pins. | // Defining button pins. | ||
| - | // | ||
| pin button1 = PIN(C, 0); | pin button1 = PIN(C, 0); | ||
| pin button2 = PIN(C, 1); | pin button2 = PIN(C, 1); | ||
| - | // | ||
| // Initialize | // Initialize | ||
| - | // | ||
| static inline void init() | static inline void init() | ||
| { | { | ||
| Line 98: | Line 92: | ||
| // Set-up of the LCD. | // Set-up of the LCD. | ||
| lcd_gfx_init(); | lcd_gfx_init(); | ||
| - | + | // Cleaning the screen. | |
| - | // Cleaning the screen. | + | |
| lcd_gfx_clear(); | lcd_gfx_clear(); | ||
| - | + | // Switching on the background light. | |
| - | // Switching on the background light. | + | |
| lcd_gfx_backlight(true); | lcd_gfx_backlight(true); | ||
| - | + | // Displaying the name of the program. | |
| - | // Displaying the name of the program. | + | |
| lcd_gfx_goto_char_xy(3, | lcd_gfx_goto_char_xy(3, | ||
| lcd_gfx_write_string(" | lcd_gfx_write_string(" | ||
| Line 120: | Line 111: | ||
| } | } | ||
| - | // | ||
| // Main program | // Main program | ||
| - | // | ||
| int main(void) | int main(void) | ||
| { | { | ||