#include <avr/sleep.h>
int ledPin = 13;
int ledDelay = 1000;
int currentDelay = 1000;
float currentConversion = 5.0 / 1023.0 / 0.1;
void setup()
{
Serial.begin(9600);
pinMode(ledPin , OUTPUT);
}
void loop()
{
digitalWrite(ledPin , HIGH);
delay(ledDelay);
digitalWrite(ledPin , LOW);
delay(ledDelay);
float current = analogRead(A0) * currentConversion;
Serial.println(current);
set_sleep_mode(SLEEP_MODE_IDLE);
sleep_enable();
delay(currentDelay);
sleep_disable();
}