X-Git-Url: http://git.piffa.net/web?a=blobdiff_plain;f=motors%2Fservo%2FKnob_2%2FKnob_2.ino;fp=motors%2Fservo%2FKnob_2%2FKnob_2.ino;h=08bd2098d0dfdc99f8fec90c5386d184b8251532;hb=ea8d99c7d1bf9824a769c81533fe90e437ccd360;hp=998c8a7c787c5780fe96b358610cdd6e36117de3;hpb=75928e346c7e5631544b0bea01e2d4ae9a5d749e;p=sketchbook_andrea diff --git a/motors/servo/Knob_2/Knob_2.ino b/motors/servo/Knob_2/Knob_2.ino index 998c8a7..08bd209 100644 --- a/motors/servo/Knob_2/Knob_2.ino +++ b/motors/servo/Knob_2/Knob_2.ino @@ -1,11 +1,13 @@ // Controlling a servo position using a potentiometer (variable resistor) // by Michal Rinott +// Schema: https://lab.piffa.net/schemi/potenziometro_bb.png + #include Servo myservo; // create servo object to control a servo -int potpin = 0; // analog pin used to connect the potentiometer +const int potpin = A0; // analog pin used to connect the potentiometer int val; // variable to read the value from the analog pin void setup()