Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: PIN_Dx definitions are causeng errors

  1. #1
    Junior Member
    Join Date
    Aug 2020
    Posts
    17

    PIN_Dx definitions are causeng errors

    Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: "Teensy 4.0, Serial, 600 MHz, Faster, US English"

    In the past I believe I have used Teensy IO pin definitions like PIN_Dx bu now when I try it gives the error:
    'PIN_D2' was not declared in this scope

    I tried reinstalling Arduino 1.8.13 and Teensyduino but those definition still generate errors.

    Is there something I need to include to use these definitions?

  2. #2
    Senior Member
    Join Date
    Nov 2015
    Location
    Cold hollow VT
    Posts
    169
    You probably need to do something like

    #define PIN_D2 2

  3. #3
    Junior Member
    Join Date
    Aug 2020
    Posts
    17
    The problem seems to be the PIN_Dx definitions are only valid for older Teensy's. This link shows the ones that are valid for them: https://www.pjrc.com/teensy/td_digital.html

    I tried them on Teensy 3.2 and 4.0 but apparently they are not valid there.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •