title: Visual Studio Code - Arduino Programming Identifier A8 - A15 (PIN_A8 to PIN_A15) is Undefined
body: <p>I am attempting to use VSCode to write my Arduino programs (MEGA2560), My issue arises when I try to setup </p>
  
  <pre><code>    const int CurrentPin = A9;
  </code></pre>
  
  <p>the A9 is underlined and problems say </p>
  
  <pre><code>    identifier "A9" is undefined [7,24]
  </code></pre>
  
  <p>I have tried changing the .vscode/arduino.json .vscode/c_cpp_properties.json</p>
  
  <p>I believe it might be part of the defines in c_cpp_properties</p>
  
  <p>edit: on occasion where I have something being defined by the pin it kicks the can down to the use of it i.e.</p>
  
  <p>line 22 </p>
  
  <pre><code>#define ONE_WIRE_BUS A13
  </code></pre>
  
  <p>line 24</p>
  
  <pre><code>OneWire oneWire(ONE_WIRE_BUS);
  </code></pre>
  
  <pre><code>identifier "A13" is undefined [24,17]
  </code></pre>
  
  <p>also when I use the "Go to Definition on the instance of A13 on line 22 it leads back to pins_arduino.h where they are all defined</p>
  
  <p>arduino.json</p>
  
  <pre><code>{
      "board": "arduino:avr:mega",
      "configuration": "cpu=atmega2560",
      "port": "/dev/ttyAMC0",
      "output": "build",
      "sketch": "Project/MyProject.ino",
      "programmer": "AVRISP mkII"
  }
  </code></pre>
  
  <p>c_cpp_properties.json</p>
  
  <pre><code>{
      "enableConfigurationSquiggles": true,
      "env", {},
      "configurations": [
          {    
               "name": "Linux",
               "includePath": [
                   "{$workspaceFolder}",
                   %Arduino and library folders%
               ],
               "browse": {
                   "limitSymbolsToIncludeHeaders": false,
                   "path": [
                       "{$workspaceFolder}",
                       %Arduino and library folders%
                   ]
               },
               "defines": [
                   "_DEBUG",
                   "UNICODE",
                   "_UNICODE",
                   "USBCON",
                   "ARDUINO_ARCH_AVR",
                   "ARDUINO_AVR_MEGA2560",
                   "ARDUINO=10800"
               ],
               "compilerPath": "/usr/bin/avr-gcc",
               "cStandard": "c11",
               "cppStandard": "c++17",
               "intelliSenseMode": "clang-x64",
               "forcedInclude": [
                   "...Arduino.h"
               ]
           }
      ],
      "version": 4
  
  }
  </code></pre>
  
  <p>MyProject.ino</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;Arduino.h&gt;
  #include &lt;Libraries.h&gt;
  
  const int currentPin =A9;
  
  
  void setup(){
  //stuff
  }
  void loop(){
  //do stuff
  }
  
  </code></pre>
  
  <p>I expected to uses the defines for the  "ARDUINO_ARCH_AVR" and the "ARDUINO_AVR_MEGA2560", to define the analog pins but they do not</p>