This commit is contained in:
Inamr 2024-03-12 13:26:12 +01:00
parent 9a38ea8911
commit 18ea74bbb6

View File

@ -20,14 +20,8 @@
#include "uart.h"
#include <util/delay.h>
void sensor_init(void) {
/* Disable digital input buffer */
while (1) {
printf("Hello, world!\n");
_delay_ms(500);
}
/* Disable digital input buffer */
}
void ADC0_init(void) {
@ -72,14 +66,8 @@ int main() {
stdout = &USART_stream;
while (1) {
//printf("loop\n");
if (ADC0_conversationDone()) {
adcVal = ADC0_read();
VREF.ADC0REF = VREF_REFSEL_VDD_gc;
printf("The values: \n");
printf("%u , %u",VREF_REFSEL_VDD_gc , adcVal);
} else {
printf("Not done\n");
}
adcVal = ADC0_read();
VREF.ADC0REF = VREF_REFSEL_VDD_gc;
printf("The values: \n%u , %u\n",VREF_REFSEL_VDD_gc , adcVal);
}
}