Hello!!
Im beginner and i don't master the subject as well. Só, i kindly need your help with my project. My goal is gathet informations of voltage's value with two solars plate (voltage greater than 5v)
I have one code on which execute this function but, i need to collect data during a full day and after put all the informations in a mamory Card. So , i would like to know how can i make a datalogger ......this is my huge doubt.
I gonna use a aurduino uno SD card shield and the system to receive the current data.
I hope hearing from you soon. Kind regards.
float tensaoA2;
float tensaoA0;
float aRef=5;
float relacaoA0=11;
float relacaoA2=11;
#define AMOSTRAS 12
void setup() {
Serial.begin(9600);
}
float lePorta(uint8_t portaAnalogica) {
float total=0;
for (int i=0; i<AMOSTRAS; i++) {
total += 1.0 * analogRead(portaAnalogica);
delay(5);
}
return total / (float)AMOSTRAS;
}
void mostraTensoes() {
Serial.print("Tensao em A2: ");
Serial.print(tensaoA2 * relacaoA2);
Serial.print ("V / ");
Serial.print("Tensao em A0: ");
Serial.print(tensaoA0 * relacaoA0);
Serial.println ("V");
}
void loop() {
tensaoA2 = (lePorta(A2) * aRef) / 1024.0;
tensaoA0 = (lePorta(A0) * aRef) / 1024.0;
mostraTensoes();
delay(500);
}