Changing pins in arduino sketch

Forums General Questions and Comments Changing pins in arduino sketch

Viewing 3 reply threads
  • Author
    Posts
    • #2207 Reply
      K. Schmidt
      Guest

      Hi.
      I use an arduino uno and already worked with an alternative GUI.
      I use different pins for the valves, led, flash and shutter.

      How can i change the pins and still use your GUI to control my setup?

      Actually i use:
      pins 2-6 for valves
      flash 1-3 at pin 7-9
      cam trigger at pin 11
      (i don’t need focus triogger. Canon in use)
      pin 12: start-button
      pin 13: status led

      So please tell me, what do i have to change ?

    • #2209 Reply
      Martyn
      Keymaster

      Which GUI are you referring to, PC or Android?

    • #2210 Reply
      K. Schmidt
      Guest

      I want to use the PC GUI on Windows 10 and Windows Desktop PC and Vista Notebook

    • #2211 Reply
      Martyn
      Keymaster

      If you look inside the Arduino sketch (near the top) you will find where the pins are defined:
      // Pins
      const byte LED_WAITING = 2;
      const byte LED_ACTIVE = 3;

      const byte sol1_TriggerPin = 7;
      const byte sol2_TriggerPin = 8;
      const byte sol3_TriggerPin = 9;

      const byte sol4_TriggerPin = 4;
      const byte sol5_TriggerPin = 5;
      const byte sol6_TriggerPin = 6;

      const byte cam_TrigShutterPin = 10;
      const byte cam_TrigFocusPin = 11;
      const byte flash_TrigPin = 12;

      Just move these around to suit yourself.

      Above the pin definitions you should see:
      #include <SoftwareSerial.h>
      SoftwareSerial BTserial(14, 15); // RX, TX

      These are the pins used for the connection to the Bluetooth module. Pins 14 and 15 are AKA A0 and A1. Even if you do not use a Bluetooth module you should either:
      – not use these pins, or
      – move them to pins you are not using.

      Canon trigger. On my Canon, bulb only works if you activate both focus and shutter. I would recommend connecting the focus pin even if you don’t want to use it.

      • This reply was modified 2 years, 8 months ago by Martyn.
Viewing 3 reply threads
Reply To: Changing pins in arduino sketch
Your information: