|
Open Sint
3.4-2
|
Analog to digital converter for davids wind direction. More...

Functions | |
| void | adc_init (void) |
| uint8_t | adc_read (void) |
| Read the ADC value. More... | |
| int | adc_wind_position (void) |
| Convert between 0-255 to 0-360 degrees. | |
Analog to digital converter for davids wind direction.
| void adc_init | ( | void | ) |
Enable ADC.
select ADC clock = F_CPU / 128, manual sample.
Set internal VREF, left adjusted result, adc0
| uint8_t adc_read | ( | void | ) |
Read the ADC value.
1.8.13