// int j=1;
// int time=5000;
// String r1="The value of current through resistor R1 is equal to :";
// //String r2="the value of current through resistor R2 is equal to :";
// int i1,i2;
// int v1,v2;
// int res= 1E03;
// void setup() {
// Serial.begin(9600);
// pinMode(A1, INPUT);
// pinMode(A2, INPUT);
// }
// void loop() {
// Serial.println(res);
// Serial.println(v1);
// //Serial.println(v2);
// v1=analogRead(A1);
// //v2=analogRead(A2);
// i1=v1*res;
// i2=v2*res;
// Serial.print(r1);
// Serial.println(i1);
// // Serial.print(r2);
// //Serial.println(i2);
// delay(time);
// }
int pin= A1, newpin=A2;
int time=500;
float num=1023/5;
float volt1,volt2;
int res=1E03;
void setup() {
Serial.begin(9600);
pinMode(pin, INPUT);
pinMode(newpin, INPUT);
}
void loop() {
int aval=analogRead(pin);
volt1=aval/num;
float current1=volt1/res;
Serial.print("The current through R1 is :");
Serial.println(current1);
delay(time);
int anewval=analogRead(newpin);
volt2=anewval/newpin;
float current2=volt2/res;
Serial.print("The current through R2 is :");
Serial.println(current2);
delay(time);
}