Easily Add Sensors & Outputs To DCC++

Поделиться
HTML-код
  • Опубликовано: 22 дек 2024

Комментарии • 33

  • @DominicFawver
    @DominicFawver 4 года назад +1

    I just started messing with this part of DCC++, so perfectly timed :)

  • @bernardc2553
    @bernardc2553 4 года назад

    What was I think N...
    OH YAH... Tom.. your the best teacher !!!

  • @ArenINMotion
    @ArenINMotion 8 месяцев назад

    So if I have a relais on pin 128 on my PCA9685 (#41) and I set it with
    7 is bit 0,1,2 high. I store it in the eprom with
    But with what command can I set the relais?

    • @TomsTrainsandThings
      @TomsTrainsandThings  7 месяцев назад

      T= turnout, Z=relay, S=sensor. To set them in eprom, use E, this will set any sensor in. As shown at 7:15

  • @BillMastersMRR
    @BillMastersMRR 9 месяцев назад

    How long of a wire run can the sensor be from the arduino? Say the ir sensor is 20 feet away from the arduino? Will it keep enough signal for the Arduino to read on that far of a run?

    • @TomsTrainsandThings
      @TomsTrainsandThings  9 месяцев назад +1

      I think the developers at DCC-EX tested the length of leads for sensors and servos at 20 ft. also with success. Although they use a PCA9685 for the control with the Arduino.
      I personally kept my Arduino close to where I was using sensors and servos. I have used a 50ft+ 4 pair twisted pair telephone cable to operate Tortoise switch machines in the past. The best way to find out is to experiment to see if it will work in your case

    • @BillMastersMRR
      @BillMastersMRR 9 месяцев назад

      @TomsTrainsandThings , Thanks. After asking I got to reading about using cat6 cable for extending the distance between I2C devices. Seems to be the way to go.

  • @Chris-xh4hw
    @Chris-xh4hw 7 месяцев назад

    So this board will only take IR sensors which run on 3.3v. I have a IR sensor which is 5v.

    • @TomsTrainsandThings
      @TomsTrainsandThings  7 месяцев назад

      I have IR sensors and relays in this video, all 5vdc. This is an I/O sensor shield, that means any input or output that has 5vdc. The pins are clearly marked as Input or output, but they can be changed in code which I discussed in another video

  • @JamesNortonJones
    @JamesNortonJones 2 года назад

    I'd wondering how you connect the power to the DF Robot Shield and the Motor shield, to they have their own power supplies or does the sensor shield power the motor shield? Thanks

    • @TomsTrainsandThings
      @TomsTrainsandThings  2 года назад

      You can see the barrel connector in the video and me explaining the switch to change from the Mega power or the external power. The motor shield is powered in the same way with external power which is explained in the DCC++ videos

    • @JamesNortonJones
      @JamesNortonJones 2 года назад

      @@TomsTrainsandThings That's great thanks for clarifying.It was just in the video it didn't show the power connector on the motor shield ruclips.net/video/TdISgXAyiOY/видео.html. I really appreciate the reply.

  • @frightrisk7407
    @frightrisk7407 4 года назад +3

    Just wanted to let you know that this is not the way it works for outputs. The command is , the IFLAGS are not separate parameters, they are bitflags in a byte. You have to do some binary to decimal math. So you have bits 0,1 and 2 reading from right to left line this (2,1,0). Those are position numbers since a bit can only hold a 1 and a 0. So if bit 1(the rightmost bit) is a 0 or a 1, it is easy since the decimal value you would enter is the same, a zero or a one. But to compute the others, the easiest way is to use the power of 2 based on the position of the bit. So 2 to the 0 power is 1, 2 the the 1st power is 2, 2 to the 2nd power is 4. So you just add those numbers together if they have a 1 in them. So 001 is 1, 010 is 2, 100 is 4.. So to set bit 0 and 2 to one, you add 1 and 4 and get 5. To set the fist two bits on, which looks like 011 to the computer, you add 1 and 2 together and get 3. You are counting in powers of two instead of powers of 10. Those 3 bits can hold 8 possible combinations of 1s and 0s. There are free online calculators in addition to the one that comes with windows that let you just turn bits on and off and it will give you the number ;)

  • @whiiiz9410
    @whiiiz9410 3 года назад

    Is it possible to enable WiFi using the DFROBOT ESP8266 WiFi Bee since we are already using the DF IO Shield instead of the recommended MakerFabs ESP8266 WIFI Shield?

    • @TomsTrainsandThings
      @TomsTrainsandThings  3 года назад

      Not with DCC++ but you might want to check into DCC++EX to see if that is one of the compatible wifi devices

    • @whiiiz9410
      @whiiiz9410 3 года назад

      @@TomsTrainsandThings Sorry I forgot to mention that I'm using DCC++EX but it's not on the official list. As I'm using an UNO hooked up to JMRI via USB and wanted to add both Sensors and Wi-Fi, hence my question. It's very hard to get the MakerFabs Wi-Fi shield so I wanted to check with you since you already have the DF IO shield before ordering the Mega and other shields.
      Thank you for replying on such an old post, really appreciated.

  • @MomentumChaser0331
    @MomentumChaser0331 11 месяцев назад +1

    My Man knows his S ah Stuff 😁👌🏼👍🏼👍🏼🙏

    • @TomsTrainsandThings
      @TomsTrainsandThings  11 месяцев назад +1

      Thanks

    • @MomentumChaser0331
      @MomentumChaser0331 11 месяцев назад

      @@TomsTrainsandThings Yes Sir I like Train’s Specially Ho Style Sir and I am working on this system that you set up here for my very own set up and testing Sir and thank you for sharing with us

  • @DudeFrom1972
    @DudeFrom1972 4 года назад

    Video request: How to install a decoder in a railwagon to operate a feature like internal light.

  • @SheltonDCruz
    @SheltonDCruz 3 года назад

    Thanks Tom!

  • @joelvale3887
    @joelvale3887 4 года назад

    Welcome to the oldtimer's club.

  • @FBMRR
    @FBMRR 4 года назад

    Yeahhhhhh..... hmmmmmmm..... but,... right... ????????????????
    Ill catch on sooner or later.

  • @westwonic
    @westwonic 3 года назад +1

    'Easily add...' seriously?