Redboard Artemis A1 to A5 pins not working

Redboard Artemis analog pins A1 to A5 will seemingly not work of you use the boards drivers after version 2.0.

Interestingly enough, if you swap to Artemis Module and use the pins dedicated for this “board” all analog pins work just fine, i.e. some set-up file after driver version 2.0 has been incorrectly changed for the redbard Artemis.

To correct this,
go to %appdata% and find the local folder.
From here:
local → Arduino15 → packages → SparkFun → hardware → apollo3 → 2.1.1 (whatever version you have) → variants → SFE_ARTEMIS → config

In this folder, i.e. the config folder, open the file named pins.cpp. Replace the content in the file with the following:

/*
// This file is subject to the terms and conditions defined in
// file ‘LICENSE.md’, which is part of this source code package.
*/

#include “bridge/pins.h”

const pin_size_t variantPinCount = 22;

PinState variantPinStates[variantPinCount] = {
{D0, 0, NULL, /NULL, NULL, NULL,/ NULL},
{D1, 1, NULL, /NULL, NULL, NULL,/ NULL},
{D2, 2, NULL, /NULL, NULL, NULL,/ NULL},
{D3, 3, NULL, /NULL, NULL, NULL,/ NULL},
{D4, 4, NULL, /NULL, NULL, NULL,/ NULL},
{D5, 5, NULL, /NULL, NULL, NULL,/ NULL},
{D6, 6, NULL, /NULL, NULL, NULL,/ NULL},
{D7, 7, NULL, /NULL, NULL, NULL,/ NULL},
{D8, 8, NULL, /NULL, NULL, NULL,/ NULL},
{D9, 9, NULL, /NULL, NULL, NULL,/ NULL},
{D10, 10, NULL, /NULL, NULL, NULL,/ NULL},
{D11, 11, NULL, /NULL, NULL, NULL,/ NULL},
{D12, 12, NULL, /NULL, NULL, NULL,/ NULL},
{D13, 13, NULL, /NULL, NULL, NULL,/ NULL},
{D14, 14, NULL, /NULL, NULL, NULL,/ NULL},
{D15, 15, NULL, /NULL, NULL, NULL,/ NULL},
{D16, 16, NULL, /NULL, NULL, NULL,/ NULL},
{D17, 17, NULL, /NULL, NULL, NULL,/ NULL},
{D18, 18, NULL, /NULL, NULL, NULL,/ NULL},
{D19, 19, NULL, /NULL, NULL, NULL,/ NULL},
{D20, 20, NULL, /NULL, NULL, NULL,/ NULL},
{D21, 21, NULL, /NULL, NULL, NULL,/ NULL},
};

As you might have noticed, they forgot to add all pins after D16, i.e. all the analog channels (D17-D21) Are not reachable.

Thanks. That is correct.
Make sure to always use the latest library version. It is corrected in the latest release 2.2.1 (among other issues)

Are you sure of this,
I have tried using A1 on version 2.2.1 with no success?

in V2.2.1 the definitions are

// Analog naming
A0 = D16,
A1 = D17,
A2 = D18,
A3 = D19,
A4 = D20,
A5 = D21,
A6 = D2,
// A7 = ??
A8 = D8,
A9 = D9,
A10 = D10,

// Digital naming
D0 = 25,
D1 = 24,
D2 = 35,
D3 = 4,
D4 = 22,
D5 = 23,
D6 = 27,
D7 = 28,
D8 = 32,
D9 = 12,
D10 = 13,
D11 = 7,
D12 = 6,
D13 = 5,
D14 = 40,
D15 = 39,
D16 = 29,
D17 = 11,
D18 = 34,
D19 = 33,
D20 = 16,
D21 = 31,
1 Like

Interesting,
thank you for the heads up.