Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. int pinMotor = 3;
  2. int PinPotenci=A0;
  3. int valorPoten;
  4. void setup()
  5. {
  6. pinMode(pinMotor, OUTPUT);
  7. Serial.begin(9600);
  8. }
  9.  
  10. void loop()
  11. {
  12. valorPoten = analogRead(PinPotenc) / 4;
  13. analogWrite(pinMotor, valorPoten);
  14. Serial.println(valorPoten);
  15.  
  16. }