Hey, for my science fair project I am building (well, attempting to build) a solar battery charger with Arduino Uno testing the charge of the batteries. The original plan was to use an LCD screen, but my LCD (brand new) is defective, so I tried printing values to my laptop. I am still trying to figure out the ratio of the analog input to the actual battery charge level. The circuit goes as follows: Two solar panels in series are wired (positive to positive, negative to negative) to a battery pack (with rechargeable batteries in it). There are two diodes coming off of the battery pack that come together into one wire that goes to the A0 pin of the Arduino. Here is the code:
void setup() {
Serial.begin(9600);
pinMode(A0, INPUT);
}
void loop() {
int analogValue = analogRead(A0);
Serial.println(analogValue);
delay(1000);
}
The problem is that I get random values when I run the code. Please help me if you can. The project's due MONDAY!