Menu

change Arduino pinout pins

2024-04-02
2024-04-05
  • Stephen Symons

    Stephen Symons - 2024-04-02

    Hello,

    I am building my second myrotator... great project, thank you.

    I am certain that I found somewhere instructions on how to change pinouts that connect to IN1 to IN4 on the ULN2002 so I can use an existing Arduino/ULN2003 board for a myrotator. In spite of much searching I cannot find it again. I just want to change the Arduino mcode to use pins D4 to D7 instead of D5,6,9 and 10.

    Can you help me with this?

    Cheers,

    Stephen

     
  • brownrb

    brownrb - 2024-04-04

    Hi Stephen

    Look in myrotator_defines.h towards the end of the file

    //#define USEMYFP2ULN2003
    #if defined(USEMYFP2ULN2003)
    #undef IN1PIN
    #undef IN2PIN
    #undef IN3PIN
    #undef IN4PIN
    // DRVBRD_myFP2ULN2003
    #define IN1PIN 4
    #define IN2PIN 5
    #define IN3PIN 6
    #define IN4PIN 7
    #endif
    
    //#define USEMYFP2L298N // with ULN2003
    #if defined(USEMYFP2L298N)
    #undef IN1PIN
    #undef IN2PIN
    #undef IN3PIN
    #undef IN4PIN
    // DRVBRD_myFP2ULN2003
    #define IN1PIN 4
    #define IN2PIN 5
    #define IN3PIN 6
    #define IN4PIN 7
    #endif
    

    I often use the myfp2_ul2003 controller as a bed for testing new rotator code, updates etc
    cause I do not want to stuff up a working rotator .... when the code has been tested, then I update the actual rotator device.

    Regards
    Robert

     
    • Stephen Symons

      Stephen Symons - 2024-04-05

      Thank you Robert, I don’t know how I missed that.

      Stephen

      Stephen Symons Sent from Gmail Mobile on my iPad

      On Thu, Apr 4, 2024 at 5:30 AM brownrb brownrb@users.sourceforge.net
      wrote:

      Hi Stephen

      Look in myrotator_defines.h towards the end of the file

      //#define USEMYFP2ULN2003

      if defined(USEMYFP2ULN2003)

      undef IN1PIN

      undef IN2PIN

      undef IN3PIN

      undef IN4PIN// DRVBRD_myFP2ULN2003

      define IN1PIN 4

      define IN2PIN 5

      define IN3PIN 6

      define IN4PIN 7

      endif

      //#define USEMYFP2L298N // with ULN2003

      if defined(USEMYFP2L298N)

      undef IN1PIN

      undef IN2PIN

      undef IN3PIN

      undef IN4PIN// DRVBRD_myFP2ULN2003

      define IN1PIN 4

      define IN2PIN 5

      define IN3PIN 6

      define IN4PIN 7

      endif

      I often use the myfp2_ul2003 controller as a bed for testing new rotator
      code, updates etc
      cause I do not want to stuff up a working rotator .... when the code has
      been tested, then I update the actual rotator device.

      Regards
      Robert


      change Arduino pinout pins
      https://sourceforge.net/p/arduino-myrotator/discussion/general/thread/c6d34209bd/?limit=25#0f42


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/arduino-myrotator/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.