1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Gamedash and Arduino Mega 2560 w/ TM1638

Discussion in 'Electronic and hardware generally' started by Archie, Apr 8, 2015.

  1. Archie

    Archie Eternal tinkerer

    Joined:
    Dec 31, 2014
    Messages:
    1,081
    Location:
    Wollongong, NSW, AU
    Balance:
    3,796Coins
    Ratings:
    +1,382 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    So, I dusted off my Arduino Mega 2560 after I got a TM1638 module from DX this week.

    The code I got from @soraz's post is set for the NANO. Where the Digital pins are D3 to D5, can I just modify the TM1638.h to map to 3 Digital pins on the Arduino Mega? (Which go from D22 to D31?)

    Tagging you @eaorobbie as I have seen a few posts where you have had input on this, so you might know :)

    Thanks,

    Archie.
    • Like Like x 1
    Last edited: Apr 8, 2015
  2. soraz

    soraz Member

    Joined:
    Mar 5, 2013
    Messages:
    68
    Location:
    Noale VE, Italia
    Balance:
    5,160Coins
    Ratings:
    +80 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    according mapping reported here -->> http://forum.arduino.cc/index.php?topic=45329.0
    i think you can modify tm1638.h

    #define PB6 6 //D12
    #define PB5 5 //D11
    #define PB4 4 //D10
    //
    #define TM_OUT PORTB
    #define TM_IN PINB
    #define TM_DDR DDRB
    #define TM_BIT_STB _BV(PB4)
    #define TM_BIT_CLK _BV(PB5)
    #define TM_BIT_DAT _BV(PB6)

    or

    //
    #define PA2 2 //D24
    #define PA1 1 //D23
    #define PA0 0 //D22
    //
    #define TM_OUT PORTA
    #define TM_IN PINA
    #define TM_DDR DDRA
    #define TM_BIT_STB _BV(PA0)
    #define TM_BIT_CLK _BV(PA1)
    #define TM_BIT_DAT _BV(PA2)
    • Like Like x 1
  3. bsft

    bsft

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Rob is at work, I have let him know via email you need assistance
    • Like Like x 1
    • Friendly Friendly x 1
  4. eaorobbie

    eaorobbie Well-Known Member SimTools Developer Gold Contributor

    Joined:
    May 26, 2009
    Messages:
    2,574
    Occupation:
    CAD Detailer
    Location:
    Ellenbrook, Western Australia
    Balance:
    20,452Coins
    Ratings:
    +1,686 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Don't see an issue just change the line that sets the Pins for the TM1638 , easy as.
    • Informative Informative x 1
  5. soraz

    soraz Member

    Joined:
    Mar 5, 2013
    Messages:
    68
    Location:
    Noale VE, Italia
    Balance:
    5,160Coins
    Ratings:
    +80 / 1 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    my project use an alternative fast library for TM1638 where pins are coded in library.
    • Informative Informative x 1
  6. Archie

    Archie Eternal tinkerer

    Joined:
    Dec 31, 2014
    Messages:
    1,081
    Location:
    Wollongong, NSW, AU
    Balance:
    3,796Coins
    Ratings:
    +1,382 / 4 / -0
    My Motion Simulator:
    2DOF, DC motor, JRK
    Figured that was the case. Will give it a go over the weekend. Thanks guys :)
  7. auryza

    auryza Active Member

    Joined:
    Jun 12, 2013
    Messages:
    109
    Location:
    Lithuania
    Balance:
    4,332Coins
    Ratings:
    +76 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, Arduino
    It's working.