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

ARDUINO MEGA 2560 , 74HC595

Discussion in 'Miscellaneous' started by Uporotiy-liss, May 8, 2014.

  1. Uporotiy-liss

    Uporotiy-liss New Member

    Joined:
    Nov 27, 2013
    Messages:
    23
    Occupation:
    Електрик
    Location:
    УКРАИНА
    Balance:
    819Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Привет. Помогите , код для АРДУИНО

    Attached Files:

    • Like Like x 1
  2. ferslash

    ferslash Active Member

    Joined:
    Feb 8, 2011
    Messages:
    495
    Balance:
    4,798Coins
    Ratings:
    +181 / 2 / -0
    ,mmm is it sirilic russian???

    can you write english so we can read? :D

    best regards from mexico

    fer
  3. Historiker

    Historiker Dramamine Adict Gold Contributor

    Joined:
    Dec 16, 2010
    Messages:
    2,160
    Occupation:
    Retired
    Location:
    Michigan USA
    Balance:
    9,195Coins
    Ratings:
    +2,161 / 19 / -1
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 6DOF
    Please use Google Translate to make your posts in English; more users will be able to understand and respond to you.

    Thanks
  4. Uporotiy-liss

    Uporotiy-liss New Member

    Joined:
    Nov 27, 2013
    Messages:
    23
    Occupation:
    Електрик
    Location:
    УКРАИНА
    Balance:
    819Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    [Цитата = "Historiker, сообщение: 55659, членом: 4542"] Пожалуйста, используйте Google Translate, чтобы сделать свои сообщения на английском языке; больше пользователей смогут понять и ответить вам.

    Благодаря [/ QUOTE][​IMG]
    Нужен код
  5. Historiker

    Historiker Dramamine Adict Gold Contributor

    Joined:
    Dec 16, 2010
    Messages:
    2,160
    Occupation:
    Retired
    Location:
    Michigan USA
    Balance:
    9,195Coins
    Ratings:
    +2,161 / 19 / -1
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 6DOF
    Пожалуйста, пост на английском языке, мы не можем помочь вам, если мы не можем понять вас. ;)

    Вот ссылка

    https://translate.google.com/#ru/en/
  6. Uporotiy-liss

    Uporotiy-liss New Member

    Joined:
    Nov 27, 2013
    Messages:
    23
    Occupation:
    Електрик
    Location:
    УКРАИНА
    Balance:
    819Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I'm from Ukraine. I need Arduino code for this scheme.
  7. Uporotiy-liss

    Uporotiy-liss New Member

    Joined:
    Nov 27, 2013
    Messages:
    23
    Occupation:
    Електрик
    Location:
    УКРАИНА
    Balance:
    819Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I'm from Ukraine. I need Arduino code for this scheme.
  8. Historiker

    Historiker Dramamine Adict Gold Contributor

    Joined:
    Dec 16, 2010
    Messages:
    2,160
    Occupation:
    Retired
    Location:
    Michigan USA
    Balance:
    9,195Coins
    Ratings:
    +2,161 / 19 / -1
    My Motion Simulator:
    3DOF, DC motor, Arduino, Motion platform, 6DOF
    Welcome Uporotiy-liss!! I know that you are also posting in the thread about the dashboard app. That might be the place to post again to ask for help using google translate.

    Again, welcome to XSimulator.net
  9. Uporotiy-liss

    Uporotiy-liss New Member

    Joined:
    Nov 27, 2013
    Messages:
    23
    Occupation:
    Електрик
    Location:
    УКРАИНА
    Balance:
    819Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I gathered scheme. I want to make it work. Need a code for the tachometer.
  10. RufusDufus

    RufusDufus Well-Known Member

    Joined:
    Jul 21, 2013
    Messages:
    681
    Location:
    Adelaide Australia
    Balance:
    15,902Coins
    Ratings:
    +1,016 / 10 / -1
    Untested... but I think this should drive the display:

    Code:
    const int DataPin=7;
    const int ClkPin=4;
    const int LatchPin=8;
    int TestLevel;
    // Set LED Bar individual LEDs based on binary Mask (bits set = LED on)
    void LEDBarSetLEDs(unsigned byte Mask)
    {
        byte i;
             
        digitalWrite(ClkPin, LOW);   // make sure the serial clk pin is low
        digitalWrite(LatchPin, LOW);   // make sure the output latch pin is low
                  
        for (i=7;i>=0;i--)
        {
            digitalWrite(DataPin, ((Mask>>i)&0x01));  // Set Data pin according to mask
            digitalWrite(ClkPin, HIGH);           // Clock the next data bit on rising clk pulse
            digitalWrite(ClkPin, LOW);  // Return clk low again ready for next cylcle
        }
        digitalWrite(LatchPin, HIGH);  // Latch data to output pins on rising edge
        digitalWrite(LatchPin, LOW);  // Return Latch low again ready for next cycle
    }
    // Set LED Bar level from 0 (off) to 8 (all LEDs on)
    void LEDBarSetLevel(unsigned byte Level)
    {
        byte i;
        if (Level=0) LEDBarSetLEDs(0x00);
        else if (Level=1) LEDBarSetLEDs(1);
        else if (Level=2) LEDBarSetLEDs(3);
        else if (Level=3) LEDBarSetLEDs(7);
        else if (Level=4) LEDBarSetLEDs(15);
        else if (Level=5) LEDBarSetLEDs(31);
        else if (Level=6) LEDBarSetLEDs(63);
        else if (Level=7) LEDBarSetLEDs(127);
        else if (Level=8) LEDBarSetLEDs(255);
    }
    // Test it....
    void setup()
    {
        pinMode(DataPin, OUTPUT);
        pinMode(ClkPin, OUTPUT);
        pinMode(LatchPin, OUTPUT);
    }
    void loop()
    {
        for(TestLevel=0;TestLevel<8;TestLevel++)
        {
            LEDBarSetLevel(TestLevel);
            delay(500);
        }
    }
    
    • Like Like x 1
  11. Uporotiy-liss

    Uporotiy-liss New Member

    Joined:
    Nov 27, 2013
    Messages:
    23
    Occupation:
    Електрик
    Location:
    УКРАИНА
    Balance:
    819Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Thank you. I will check.
  12. Uporotiy-liss

    Uporotiy-liss New Member

    Joined:
    Nov 27, 2013
    Messages:
    23
    Occupation:
    Електрик
    Location:
    УКРАИНА
    Balance:
    819Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    How to run Arduino in the game? Your sketch fails. "stray\ in program"
  13. 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,431Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Well blow me over, that's my old picture from a very old post, XDash.
    I will search my drive, sure I still have the original code somewhere.
    Picture of the boards I had made -
    2012-09-17 21.54.59.png
    Contained a Rpm Light bar on one pcb, another had a 7 seg gear indicator and shift lights, the third board had a speedo and warning lights for oil and water. Might have to dust it off and fire it all back up.
    • Like Like x 1
  14. 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,431Coins
    Ratings:
    +1,684 / 23 / -2
    My Motion Simulator:
    2DOF, DC motor, JRK, SimforceGT, 6DOF
    Ok found my old code, lol was for the old software, now to test in SimTools.
    Ok Rpm needs to be an 8bit decimal in order for this code to function under the GameDash.

    Script needs to change the outputted Rpm to 0-255.
    Command - Rxxx where xxx 0-255.

    Ok need to plug it back into my test ard and fire it back up and change the code so we can use this with GameDash.
    If ya beat me at it , I hope this helps.

    Attached Files:

    • Like Like x 1
  15. Uporotiy-liss

    Uporotiy-liss New Member

    Joined:
    Nov 27, 2013
    Messages:
    23
    Occupation:
    Електрик
    Location:
    УКРАИНА
    Balance:
    819Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I want it. Do you have diagram? Can collect this scheme of 5 74HC595?
  16. Uporotiy-liss

    Uporotiy-liss New Member

    Joined:
    Nov 27, 2013
    Messages:
    23
    Occupation:
    Електрик
    Location:
    УКРАИНА
    Balance:
    819Coins
    Ratings:
    +12 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Your code is loaded. Now see the work in a game like?