Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int potenciometro = A0;
- float valorVolts;
- int valor;
- void setup()
- {
- Serial.begin(9600);
- }
- void loop()
- {
- valor = analogRead(potenciometro);
- valorVolts = valor * 5.0/1023.0;
- Serial.print("Valor do Potenciometro: ");
- Serial.print(valor);
- Serial.print(" Valor em Volts: ");
- Serial.print(valorVolts);
- Serial.println(" V");
- delay(200);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement