The Analog I/O API makes use of the LinkIt Analog to Digital Converter (ADC) to convert continuous analog signals into discrete digital signals read from the assigned analog pin (see Table below), for
to read the voltage of a sensor. The process is used in reverse to convert discrete digital signals to a continuous analog signal for writing to an assigned pin.
Table: The analog input and output pins
Board |
Analog input pin |
Analog output pin |
LinkIt ONE |
A0,A1,A2 |
D3, D9 |
Please note the following:
LinkIt ONE provides 3 analog inputs (A0 to A2) compared to 6 inputs (A0 to A5) on Arduino UNO. Although LinkIt ONE operates on 3.3V, the analog input still accepts 0 to 5V inputs and transforms them to the digital range 0 to 1023.
LinkIt ONE provides 2 PWM outputs (D3, D9) compared to 6 outputs (D3, D5, D6, D9, D10, D11) on Arduino UNO. However, the output from LinkIt on D3 and D9 supports accuracy up to 13-bit. The bit accuracy effects the output frequency, with 1.6kHz offered at 13bit, 50.8kHz at 8bit and 800kHz at 4bit.
Function |
Description |
Reads the value of an specified analog input pin. It will map input votages 0 to 5 volts into integer values 0 to 1023. | |
Outputs analog value(PWM wave)to the assigned analog output pin. | |
Outputs analog value (PWM wave) to the assigned analog output pin. |