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

I cant connect together arduino 2560 amd SimTools

Discussion in 'DIY Motion Simulator Projects' started by MagicMike, Feb 11, 2014.

  1. MagicMike

    MagicMike New Member

    Joined:
    Jan 26, 2014
    Messages:
    24
    Balance:
    961Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    I cant receive data on my arduino board! i just receive only 255, 255,255..
  2. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,638Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Hi, @MagicMike. How do you think is anybody can help you based on your information? ;)

    There are a lot of reasons:
    1 - your Arduino sketch is incorrect (wrong serial port initialization, wrong byte recognize, etc.)
    2 - your SimTools setup is incorrect
    3 - etc...

    Please post your sketch and SimTools Interface Setting...

    PS: How you detected that Arduino receive 255,255,255?

    Regards :cheers
    • Like Like x 1
    • Useful Useful x 1
  3. MagicMike

    MagicMike New Member

    Joined:
    Jan 26, 2014
    Messages:
    24
    Balance:
    961Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    const int ledPin = 2;

    void setup()
    {
    Serial.begin(9600);
    pinMode(ledPin, OUTPUT);
    }

    void loop() {
    byte brightness;

    if (Serial.available()) {
    brightness = Serial.read();
    analogWrite(ledPin, brightness);
    }
    }

    All i want is to grab the values from the sim tool and dim one simple led! Thank you :)
  4. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,638Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
  5. MagicMike

    MagicMike New Member

    Joined:
    Jan 26, 2014
    Messages:
    24
    Balance:
    961Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Sorry! :)

    Attached Files:

    • snap.jpg
      snap.jpg
      File size:
      146.7 KB
      Views:
      470
  6. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,638Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    your COM port baud rates are different. 9600 in sketch and 115200 in SimTools.

  7. MagicMike

    MagicMike New Member

    Joined:
    Jan 26, 2014
    Messages:
    24
    Balance:
    961Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Ok i have fix this error . Also this is another snapshot of Simtools

    Attached Files:

  8. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,638Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
  9. MagicMike

    MagicMike New Member

    Joined:
    Jan 26, 2014
    Messages:
    24
    Balance:
    961Coins
    Ratings:
    +2 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino, Motion platform
    Ok i fix that all ready! But the problem still here. I think the problem is about how i read the data from the SimTools
    Last edited: Feb 11, 2014
  10. prilad

    prilad Well-Known Member SimAxe Beta Tester SimTools Developer

    Joined:
    Apr 29, 2012
    Messages:
    380
    Location:
    Dubna, Russia
    Balance:
    9,638Coins
    Ratings:
    +512 / 1 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino, 4DOF
    Try to change sketch like this (add "Serial.write(brightness);") and try to connect with Arduino by Serial Port Monitor in Arduino IDE
    You should receive correct data...

    Code:
    const int ledPin = 2;
    
    void setup()
    {
    Serial.begin(9600);
    pinMode(ledPin, OUTPUT);
    }
    
    void loop() {
    byte brightness;
    
    if (Serial.available()) {
    brightness = Serial.read();
    analogWrite(ledPin, brightness);
    Serial.write(brightness);
    }
    }
    • Like Like x 1