<< Arduino toolbox Arduino toolbox ANALOG_WRITE_SB >>

Arduino toolbox >> Arduino toolbox > ANALOG_READ_SB

ANALOG_READ_SB

Acquires data from the Arduino analog port, the 10 bit ADC.

Overview

Contents

Palette

Arduino

Description

The Arduino Uno has 6 analog ports (A0 to A5), the Arduino Mega has 16 such ports (A0 to A15). The block reads the value from an analog port (10 bit value from an Analog to Digital Converter (ADC).

The maximum frequency of acquisition for this block is approximately 125 Hz.

Parameters

The port number 0 to 5 must be given for an Arduino UNO, 0 to 15 for an Arduino MEGA. There is no check on this value

The card number if several Arduinos are used. Must be 1 for the moment

Example 1

The example below show the use of the block in case of a potentiometer with its middle pin is connected to analog port 2. The other 2 pins are connected to 5V and ground.

See also


Report an issue
<< Arduino toolbox Arduino toolbox ANALOG_WRITE_SB >>