2024-03-13 10:46:02 +00:00
|
|
|
/*
|
|
|
|
|
* File: main.c
|
|
|
|
|
* Author: Sebastian H. Gabrielli
|
|
|
|
|
*
|
|
|
|
|
* Created on March 6, 2024, 12:34 PM
|
|
|
|
|
*/
|
|
|
|
|
#include "voltage.h"
|
|
|
|
|
#include "uart.h"
|
|
|
|
|
#define RTC_PERIOD (511)
|
|
|
|
|
#define DELAY_TIME 1000
|
|
|
|
|
#include <avr/io.h>
|
|
|
|
|
#include <avr/interrupt.h>
|
|
|
|
|
#include <util/delay.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
|
|
#define F_CPU 4E6
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
sensor_init();
|
|
|
|
|
ADC0_init();
|
|
|
|
|
init_uart((uint16_t)9600);
|
|
|
|
|
stdout = &USART_stream;
|
|
|
|
|
|
|
|
|
|
while (1) {
|
|
|
|
|
voltage_values();
|
|
|
|
|
//printf("The values: \n%u , %u\n",VREF_REFSEL_VDD_gc , adcVal);
|
|
|
|
|
}
|
2024-03-11 14:48:20 +00:00
|
|
|
}
|