This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:examples:sensor:thermistor [2015/11/13 09:43] – heikopikner | en:examples:sensor:thermistor [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 79: | Line 79: | ||
| { | { | ||
| // Since the table begins with 0 but values of the elements | // Since the table begins with 0 but values of the elements | ||
| - | // from -20, the value must be shifted. | + | // from -20, the value must be shifted |
| return celsius + min_temp; | return celsius + min_temp; | ||
| } | } | ||
| Line 139: | Line 139: | ||
| temperature = thermistor_calculate_celsius(value); | temperature = thermistor_calculate_celsius(value); | ||
| - | // Converting the temperature in to text. | + | // Converting the temperature in to text |
| - | // To display the degree sign, the octal variable is 56. | + | // To display the degree sign, the octal variable is 56 |
| sprintf(text, | sprintf(text, | ||
| - | // Displaying the text in the beginning of the third row of the LCD. | + | // Displaying the text in the beginning of the third row of the LCD |
| lcd_gfx_goto_char_xy(5, | lcd_gfx_goto_char_xy(5, | ||
| lcd_gfx_write_string(text); | lcd_gfx_write_string(text); | ||