Along with the digital pins, the Metro also has 6 pins which can be used for analog input.

These inputs take a voltage (from 0 to 5 volts) and convert it to a digital number between 0 (0 volts) and 1023 (5 volts) (10 bits of resolution). 

A very useful device that exploits these inputs is a potentiometer (also called a variable resistor). When it is connected with 5 volts across its outer pins the middle pin will read some value between 0 and 5 volts dependent on the angle to which it is turned (ie. 2.5 volts in the middle). We can then use the returned values as a variable in our program.

This guide was first published on Aug 18, 2017. It was last updated on Jun 18, 2024.

This page (CIRC08: Twisting) was last updated on Jun 13, 2017.

Text editor powered by tinymce.