This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:examples:sensor:potentiometer [2015/11/13 09:24] – heikopikner | en:examples:sensor:potentiometer [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~PB~~ | + | < |
| - | ====== | + | ====== |
| //Necessary knowledge: | //Necessary knowledge: | ||
| Line 32: | Line 32: | ||
| <code c> | <code c> | ||
| - | // | ||
| // Starting the ADC | // Starting the ADC | ||
| - | // | ||
| void adc_init(adc_reference reference, adc_prescale prescale) | void adc_init(adc_reference reference, adc_prescale prescale) | ||
| { | { | ||
| Line 44: | Line 42: | ||
| } | } | ||
| - | // | ||
| // Converting the values of selected channel | // Converting the values of selected channel | ||
| - | // | ||
| unsigned short adc_get_value(unsigned char channel) | unsigned short adc_get_value(unsigned char channel) | ||
| { | { | ||