Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- delay(400);
- sensorValue = analogRead(A0);
- Serial.print("sensor Value: ");
- Serial.print(sensorValue);
- // convert the ADC reading to voltage
- float voltage = (sensorValue/1023.0) * 5.0;
- float resistance = ((4700 * voltage) / (5 - voltage));
- Serial.print(", Resistance: ");
- Serial.println(resistance);
- // Send the voltage level out the Serial port
- Serial.print(", Volts: ");
- Serial.print(voltage);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement