IT WORKS
This commit is contained in:
parent
9a38ea8911
commit
18ea74bbb6
@ -20,14 +20,8 @@
|
|||||||
#include "uart.h"
|
#include "uart.h"
|
||||||
#include <util/delay.h>
|
#include <util/delay.h>
|
||||||
|
|
||||||
|
|
||||||
void sensor_init(void) {
|
void sensor_init(void) {
|
||||||
/* Disable digital input buffer */
|
/* Disable digital input buffer */
|
||||||
|
|
||||||
while (1) {
|
|
||||||
printf("Hello, world!\n");
|
|
||||||
_delay_ms(500);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADC0_init(void) {
|
void ADC0_init(void) {
|
||||||
@ -72,14 +66,8 @@ int main() {
|
|||||||
stdout = &USART_stream;
|
stdout = &USART_stream;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
//printf("loop\n");
|
|
||||||
if (ADC0_conversationDone()) {
|
|
||||||
adcVal = ADC0_read();
|
adcVal = ADC0_read();
|
||||||
VREF.ADC0REF = VREF_REFSEL_VDD_gc;
|
VREF.ADC0REF = VREF_REFSEL_VDD_gc;
|
||||||
printf("The values: \n");
|
printf("The values: \n%u , %u\n",VREF_REFSEL_VDD_gc , adcVal);
|
||||||
printf("%u , %u",VREF_REFSEL_VDD_gc , adcVal);
|
|
||||||
} else {
|
|
||||||
printf("Not done\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user