Sleep the CPU after first iteration, for sanity

This commit is contained in:
Imbus 2024-03-24 05:08:56 +01:00
parent 008807d6cb
commit bbaf73ef6e

3
main.c
View file

@ -8,6 +8,7 @@
#define LED_PIN PB5 // Define the pin connected to the LED
#include <avr/io.h>
#include <avr/sleep.h>
#include <math.h>
#include <util/delay.h>
@ -55,7 +56,7 @@ int main(void) {
MPU6050_Read_Accel(accel_data);
UART_println("Accelerometer (mg): X=%d, Y=%d, Z=%d", accel_data[0], accel_data[1], accel_data[2]);
_delay_ms(1000);
sleep_mode();
}
return 0;