+P2 notcompiling with D20

Have been using the P2 for about 6 months and occasionally I get an error when compiling. This line is allegedly at fault:

const byte MagnetSelect = D20; // 2-channel mux

Anyone else seeing this, or have any suggestions?


Which compiler? Workbench local, Workbench cloud, CLI, or Web IDE?

The most common reason for this is that the compiler is not actually targeting the P2, it’s targeting something that doesn’t have a D20 pin like the Photon.

I’m using the web IDE, but figured it out. I had switched between working on an Argon to working on a P2, but still had the Argon selected as the target device. No D20 on the Argon so it wouldn’t compile.

Thanks anyway.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.