Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Analog Pin Configuration

Alan Yorinks edited this page Mar 11, 2019 · 12 revisions

Snap! tab location: Sensing tab.

This command block configures an analog input pin (pins marked with an Arduino 'A' designator).

Enter the pin number without the letter 'A', for example to enter pin A5, just enter 5.

The drop down list on the left side of this block allows you to select whether or not to have data changes reported to the Analog Read block. If enabled is selected, all updates are continuously processed and can be read from Analog Read. If disabled is selected, the Analog Read Block will show the last value received before reporting was disabled and will not be updated unless reporting is re-enabled for the pin.

For analog pins, unlike digital pins, enable/disable is specific to the designated pin and not a group of pins. Enabling or disabling only affects the pin selected and no others.

Debugging Values

Debugger Value Explanation
0 No Error
2-1 The pin number specified is not an integer value
2-2 The pin number specified is not a valid analog pin number