Typical microcontrollers have analog inputs. In Arduino and Energia environment one can just use analogRead To use it we need to connect appropriate signal to analog capable microcontroller pin. The simplest signal source is a potentiometer. Potentiometer may be connected using male-to-male jumper wires and wires with alligator clips. In general one needs to convert signal to voltage in correct range. Namely typically analog to digital convertor (ADC) works for voltages between 0 and reference voltage. If supply voltage is used as reference then this this give range between 0 and supply voltage (that is 0-5V for Arduino, 0-3.0V (or 0-3.3V) for STM boards etc.). This is the default setting in Arduino and Energia environments. But it is possible to use different reference voltage, which would give narrower range. For measuring voltage one may need to use divider circuit (basically two resistors) or an amplifier (if voltage is to small for direct measurement). To measure current typical approach is to measure voltage drop on a resistor. This voltage is usually small, so one needs amplifier. To measure resistance one typically measures voltage drop on measured element, either using known current or building a voltage divider from known resistor and the unknown one. Using voltage drop on resistor for measuring current creates galvanic connection between processor and measured circuit (which can be dangerous). In case of large currents there will be nontrivial power loss in measurement resistor. In case of alternating current on can use special transformer (called current sensor) to get current proportional to measured current but much smaller (typically 1000 times or 2000 time smaller). This eliminates problems with power loss in measurement resistor. There is another method for measuring current: current produces magnetic field and one can use Hall sensor to measure strength of the field so this leads to measurement of current.

To measure temperature one can use change of resistance due to temperature. Thermistors have nonlinear character (which limits accuracy) and work in restricted range of temperatures but are quite cheap. Special resistor from material with large temperature coefficients have only small nonlinearity and better accuracy, but are more expensive. A bit different method uses voltage drop on semiconductor junction. Special circuits have quite good linearity, but require calibration and work in restricted range of temperatures (like other semiconductors). Microcontollers containing ADC typically also contains temperature sensor (semiconductor circuit producing voltage proportional to temperature). Result from such sensor are repeatable with good accuracy, but absolute value may vary quite a lot between different chips. So to get any accuracy one needs to calibrate the sensor: put chip at known temperature and read values given by the sensor. Comparing known values of temperature and results from sensor at few points one can find dependence between sensor reading and actual value. Already using one point can produce useful results. There are also special chips for measuring temperature. They are calibrated at the factory and give good accuracy. Different method for measuring temperature uses thermoelectric effect. Junction between two different metals (thermocouple). produces voltage depending on temperature. This works in rather wide range of temperatures and gives reasonably good accuracy. However, voltage from thermocouple is quite low and one need special sensitive amplifier. Several other quantities can be converted to voltage or resistance. We only mention (but without detail) strain gauges. Beside voltage another quantity that can be measured is time and frequency. Namely, processor contains clock circuit. If this circuit uses quartz oscillator, then clock frequency is quite stable. Counting clock cycles we can measure time. Counting cycles of another signal for a known time gives measurement of frequency. Measurement of time can be used to measure other quantities. For example, when capacitor and resistor are connected in series then speed of changes of voltage is proportional to product of capacitance and resistance. Measuring time needed for change in circuit with known resistance we can measure capacitance. With known capacitance we could measure resistance. As an remark let us add that many touch sensitive devices either measure change in resistance or capacitance. Practically, we have potentiometer which may be connected using male-to-male jumper wires and wires with alligator clips. More precisely, ends of potentiometer should be connected to ground and supply voltage, while middle leg gives signal. We also have photoresistors and thermistors which can be connected with a resistor to form voltage divider (the whole circuit can be easily build on solderless breadboard): we connect photoresistor in series with a resistor, so that one leg of photoresistor is connected to ground and second gives signal and simultaneously is connected with one leg of the resistor. The second leg of the resistor is connected to supply voltage. We also have a few special modules: photoresistor, thermistor and linear Hall sensor. They produce voltage signal: in case of photoresistor and thermistor module contains voltage divider. There are also sensors that measure given quantity and directly give digital result.