The slider is a device called a 'potentiometer'. It's a lot like the knob! It is a resistor whose resistance changes as you move the slider. The Arduino can measure the resistance, and then tell you what setting the slider is at.
Gets a position reading from the slider.
It returns an
int, which is the slider position between 0-1023.
First it takes a reading from the slider. Then it sends a message including this reading over the Serial connection.
Click the magnifying glass icon in the top right hand corner of the Arduino IDE to see the messages that Arduino sends to you through the Serial connection.
This is a handy component to use when you want to manually change a value in your sketch. Try using it to dim the brightness of your LED!