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

Help with arduino code

Discussion in 'DIY Motion Simulator Projects' started by Anguspogo, Dec 20, 2017.

  1. Anguspogo

    Anguspogo New Member

    Joined:
    Jan 28, 2014
    Messages:
    9
    Balance:
    406Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    AC motor, SimAxe, Arduino, 4DOF
    HI all
    I am looking for a arduino wizard code person that can help me wright code
    I have an arduino with an Ethernet card on top the reason for this is I am trying to making a 360 deg machine with this in mind i do not wont to run the signal wires through slip rings and maybe later I could use a wi-fi setup



    upload_2017-12-20_12-18-31.png

    picture of motor and gearbox 10 to 1 ratio

    upload_2017-12-20_12-9-29.png

    upload_2017-12-20_12-10-34.png



    This is the driver that controls my motor and i have lots of settings i can use It need two pins 1 for direction and 1 for pulse


    upload_2017-12-20_12-4-1.png
    This example code runs my nema 42 stepper motor very well i can make it ramp up to speed and down again and also change direction


    upload_2017-12-20_11-54-33.png


    This code works fine


    upload_2017-12-20_11-19-2.png

    On test mode i have a number in the serial monitor which ranges from 0 to 255 as i am on 8 bit
    The picture shows med position

    upload_2017-12-20_12-39-5.png


    After about 4 weeks of trying to combine the two programs together i found out that the data coming from simtools is a char number not an int number. I have tried to make it a string and then change it to a int but with no success
    So if any body in sim tool land has any programming help or ideas how i could make this work I would be the happiest man alive and the arduino card will stay where it is and not out the window
    I confess i have only just started to learn code by watching lot's of you tube video and making led's blink and things
    Thank you all in taken the time to look through this post
    so Merry Christmas and a great new year upload_2017-12-20_11-19-2.png

    Attached Files:

  2. armpit

    armpit Active Member

    Joined:
    Jan 7, 2016
    Messages:
    128
    Occupation:
    Software Engineer
    Location:
    SC, USA
    Balance:
    - 8Coins
    Ratings:
    +132 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    udp.read() returns a char array value.
    You can easily convert that char array value to an integer by using the atoi function, like this
    int convertedUdpValue = atoi(packetBuffer);

    Then println the convertedUdpValue variable to see if that shows the integer you'd expect now, and use that converted value anywhere you


    You have a few other issues with your code that should be addressed:
    You have an erroneous semicolon after your conditional "if (packetSize > 0)" which prevents the condition from actually restricting the following branch of code
    You have the serial.read loop which will overwrite the string datReq with any value coming in from Serial, which I'm not sure if you are doing intentionally. If I'm understanding your intentions, you can remove lines 25-27 in the last screenshot to avoid issues with your udp.read value getting destroyed. If you are intentionally trying to read a serial value, consider assigning it to a different variable so you can retain the udp.read value.


    Here's what I think your main loop should be replaced with (untested code, I don't have an arduino IDE in front of me right now) :
    Code:
    ...
    
    int convertedUdpValue;   //Define the convertedUdpValue var for use inside the loop
    
    void loop()
    {
        packetsize = Udp.parsePacket();
        if (packetSize > 0)
        {
            Udp.read(packetBuffer, UDP_TX_PACKET_MAX_SIZE);
            convertedUdpValue = atoi(packetBuffer);  //convert the packetBuffer char to a usable integer
            serial.println(convertedUdpValue);
    
           //Use the convertedUdpValue as an integer wherever you need inside this portion of the loop
    
        }
        memset(packetBuffer, 0, UDP_TX_PACKET_MAX_SIZE);  //I'm not sure you need this line
    }
    
    ...
    
    
    If this doesn't help, can you upload your code files? I'll take a look at them
    Last edited: Dec 20, 2017
  3. Anguspogo

    Anguspogo New Member

    Joined:
    Jan 28, 2014
    Messages:
    9
    Balance:
    406Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    AC motor, SimAxe, Arduino, 4DOF
    Mr Armpit
    Thank you so so much for your time you have given me the best Christmas present of all time i have motor movement when i move my sliders in in the game engine output testing
    I have to go to work now so i have no time to work out now how far i have to travel for one complete turn of my motor gearbox setup. I have forward an back movement with the sliders.
    Sir you are a wizard and thank you so much for your time
    I live in France but i was from the UK 17 years ago the french way would to kiss you on both cheeks but i think shaking your hand is better
    you have got me going againe
    Thank You
    upload_2017-12-21_9-24-37.png
    • Friendly Friendly x 4
  4. armpit

    armpit Active Member

    Joined:
    Jan 7, 2016
    Messages:
    128
    Occupation:
    Software Engineer
    Location:
    SC, USA
    Balance:
    - 8Coins
    Ratings:
    +132 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Ha, you're welcome! So happy it works!
  5. Anguspogo

    Anguspogo New Member

    Joined:
    Jan 28, 2014
    Messages:
    9
    Balance:
    406Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    AC motor, SimAxe, Arduino, 4DOF
    Happy new year ever one
    Mr Armpit help me out loads before Christmas i was going to send him a PM but i decided not to just in case this thread helps other people out and also i don't wont to burden him with my problem.
    I have two problems
    The first problem is moving the motor to a position which is a long way away and is always updating
    The program (below) is fine for very small movements but if i do a large movement the motor moves to the first position then reads the next position and so on resulting in a motor doing moves which i told it to do 4 - 5 - 6 seconds ago. The data seams to be stuck in the buffer and it reads the data in order rather than taking the newest data and acting on it
    The accelstepper library looks like the one i need to use because it has a ramp up and down function , which i need because i have a gearbox 10 to 1 ratio on it. The stepper needs to increase speed the further it has to travel and all so needs to slow down again.
    The library has lots of functions which i have tried to use but i just cant get the how to wright them in
    like computeNewSpeed()
    The library can be found here http://www.airspayce.com/mikem/ardu...tepper.html#affbee789b5c19165846cf0409860ae79

    My second problem is sim tools sends out a number between 0 and 255 i need to make it say when the next number from 255 is 0 or at the other end 0 the next number 255 because at the moment when i get to say 255 it will return to 0 by reversing the motor direction back to 0
    I know this is a big ask but any help would be most appreciated. If i can get this side of things working how i would like them to work i can then start building my 360 deg sim which i can use with falcon 4 and x sim ect
    I am not a programmer so please can you help in simple man's terms i am good with my hand's but not so good between the ears.
    Thank you all and happy new year

    #include <AccelStepper.h>
    #include <Ethernet.h>
    #include <EthernetUdp.h>
    #include <SPI.h>
    byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
    IPAddress ip(192, 168, 1, 177);
    unsigned int localPort = 8888;
    char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet,
    EthernetUDP Udp;
    int MidValue = 127; //middle position

    float distanceToTravel = 0;
    int packetSize;
    const int stepsPerRevolution = 8000; //number of steps it takes for motor to turn gearbox 1 turn

    int convertedUdpValue; //Define the convertedUdpValue var for use inside the loop
    // Define a stepper and the pins it will use
    AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5

    void setup()
    {
    Serial.begin(115200);
    Ethernet.begin(mac, ip);
    Udp.begin(localPort);
    stepper.setMaxSpeed(2000);
    stepper.setAcceleration(1000);

    }
    void loop()
    {
    packetSize = Udp.parsePacket();
    if (packetSize > 0)
    {
    Udp.read(packetBuffer, UDP_TX_PACKET_MAX_SIZE);
    convertedUdpValue = atoi(packetBuffer); //convert the packetBuffer char to a usable integer
    if (convertedUdpValue == MidValue) {
    float distanceToTravel= convertedUdpValue - convertedUdpValue; // to give me 0 point
    // Serial.println ("mid position");
    //Serial.println(convertedUdpValue);
    //Serial.println(distanceToTravel); // this gives me a 0 point
    //Serial.flush();
    }
    if (convertedUdpValue > MidValue) {
    float distanceToTravel = (convertedUdpValue - MidValue)*31.37; //8000 to turn 1 rotation / 255
    //stepper.moveTo(distanceToTravel);
    //if (stepper.distanceToGo() > 0)
    //stepper.moveTo(+stepper.currentPosition());
    // Serial.println ("clockwise");
    // Serial.println(convertedUdpValue);
    //Serial.println(distanceToTravel);
    stepper.runToNewPosition(distanceToTravel);
    //stepper.moveTo(distanceToTravel);
    //stepper.runSpeed();
    //Serial.flush();
    delay (1);
    }
    if (convertedUdpValue < MidValue) {
    float distanceToTravel= (convertedUdpValue - MidValue)*31.37;
    //stepper.moveTo(distanceToTravel);
    //if (stepper.distanceToGo() < 0)
    // stepper.moveTo(-stepper.currentPosition());
    // Serial.println ("antyclockwise");
    // Serial.println(convertedUdpValue);
    //Serial.println(distanceToTravel);
    stepper.runToNewPosition(distanceToTravel);
    // stepper.moveTo(distanceToTravel);
    //stepper.runSpeed();
    //Serial.flush();
    delay (1);
    }
    memset(packetBuffer, 0, UDP_TX_PACKET_MAX_SIZE); // if i commet out this line gives me strange numbers
    }
    }
  6. armpit

    armpit Active Member

    Joined:
    Jan 7, 2016
    Messages:
    128
    Occupation:
    Software Engineer
    Location:
    SC, USA
    Balance:
    - 8Coins
    Ratings:
    +132 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    I looked at the documentation for the accelstepper library you are using and it looks like the "runToNewPosition" function blocks any new positions from being listened to until it reaches the destination (blocking function). It says moveTo should be used in cases like yours where you are inside a loop constantly ready to send new destination positions. Try that and see if that fixes this issue.

    This is untested code (no stepper motors or spare arduino to load it on in front of me), so it may need some modifying to do what you are after, but in my head it works right... ;)

    I commented it where it made sense to, see if it all makes sense to you. Basically it determines if the distance to move using values 0-"stepsPerRevolution" steps is bigger than half a full rotation. If it is, then it would be quicker to add (or subtract) 8000 steps from where it's trying to go and use that new step value to get there faster. It does some other fancy stuff to figure out if there's already been a loop in the past to make sure it's always looping or unlooping the motor where it's quicker.

    This method of handling this looping can will run into issues if you have more than 268435 full rotations of the motor in the same direction, but I think that'd be hard to encounter.

    Replace your current loop() with this:
    Code:
    int currentStepperRotations = 0;
    float desiredLocation = 0;
    float nearestStepLocationForDestination = 0;
    float stepperLocationWithoutExtraRotations = 0;
    void loop()
    {
      packetSize = Udp.parsePacket();
      if (packetSize > 0)
      {
        Udp.read(packetBuffer, UDP_TX_PACKET_MAX_SIZE);
        convertedUdpValue = atoi(packetBuffer); //convert the packetBuffer char to a usable integer
    
        //Get a positive or negative whole number representing how many times and which direction we have looped the motor
        currentStepperRotations = (int)(stepper.currentPosition() / stepsPerRevolution);
    
        //Set the desired location to include the current rotations
        desiredLocation = (convertedUdpValue - MidValue)*31.37 + (currentStepperRotations * stepsPerRevolution);
    
        //Check if it's closer for us to complete the stepper circle and continue
        //from there than just moving directly to the point based on a zero origin
        stepperLocationWithoutExtraRotations = stepper.currentPosition() - (currentStepperRotations * stepsPerRevolution);
    
        if(abs(stepper.currentPosition() - desiredLocation) > (stepsPerRevolution/2))
        {
          //If we are in here, it means it's closer to loop around.
          //Now we need to figure out which direction to loop around
          if(stepper.currentPosition() - desiredLocation > 0)
          {
            //Continue onto the next positive rotation
            currentStepperRotations++;
          }
          if(stepper.currentPosition() - desiredLocation < 0)
          {
            //Go back a revolution
            currentStepperRotations--;
          }
        }
        //Take the rotations into account and reassign the desiredLocation
        desiredLocation = (convertedUdpValue - MidValue)*31.37 + (currentStepperRotations * stepsPerRevolution);
    
        delay (1);
        stepper.moveTo(desiredLocation);
    
        memset(packetBuffer, 0, UDP_TX_PACKET_MAX_SIZE); // if i commet out this line gives me strange numbers
      }
    }
    
    • Informative Informative x 1
    Last edited: Jan 2, 2018
  7. Anguspogo

    Anguspogo New Member

    Joined:
    Jan 28, 2014
    Messages:
    9
    Balance:
    406Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    AC motor, SimAxe, Arduino, 4DOF
    Thank you for your reply and i feel very honoured that you are taking time to help me with my project. I understand that you do not have the setup in front of you and this is all coming from your knowledge in writing code
    I have just signed up with youtube so i can post some youtude video's to show you what is happening
    This first video is of the motor doing a random movement from a example sketch from within the accelstepper libaray
    it shows wot the motor can do in speed and movment.


    // Random.pde
    // -*- mode: C++ -*-
    //
    // Make a single stepper perform random changes in speed, position and acceleration
    //
    // Copyright (C) 2009 Mike McCauley
    // $Id: Random.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $

    #include <AccelStepper.h>

    // Define a stepper and the pins it will use
    AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5

    void setup()
    {
    }

    void loop()
    {
    if (stepper.distanceToGo() == 0)
    {
    // Random change to speed, position and acceleration
    // Make sure we dont get 0 speed or accelerations
    delay(1000);
    stepper.moveTo(rand() % 16000); // have increased to 2 turns of gear box just see more movmwnt
    //stepper.moveTo(16000) ;
    stepper.setMaxSpeed((rand() % 20000) + 1); // been playing with this to see how fast i can get it to go
    stepper.setAcceleration((rand() % 8000) + 1);
    }
    stepper.run();
    }

    This is the code that runs that

    The next video shows me moving the sliders in simtools to make motor move with the code you sent me.
    I have added a serial.println to see if things are working on the serial monitor.
    I have also added a stepper.run at the bottom to get motors to move
    I have noticed that in the serial monitor the changing numbers are updating all the time because as before when i was using stepper.runToNewPosition the serial was stopping on the number until motor had completed its move
    As you will see in the video below the motor never gets to any great speed it just ticks along i do have forward and back movement and if i do go beyond half way say on the positive side of the scale it will find the closest route to minus side of the scale and not reverse the motor
    this is ok but if the motors are set up as a roll on an aircraft and i have moved beyond half way and a raped move in the other direction beyond half way on the other side of the scale the motor will keep going the same way util position is reached



    #include <AccelStepper.h>
    #include <Ethernet.h>
    #include <EthernetUdp.h>
    #include <SPI.h>
    byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
    IPAddress ip(192, 168, 1, 177);
    unsigned int localPort = 8888;
    char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet,
    EthernetUDP Udp;
    int MidValue = 127; //middle position

    float distanceToTravel = 0;
    int packetSize;
    const int stepsPerRevolution = 8000; //number of steps it takes for motor to turn gearbox 1 turn

    int convertedUdpValue; //Define the convertedUdpValue var for use inside the loop
    // Define a stepper and the pins it will use
    AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5
    int currentStepperRotations = 0;
    float desiredLocation = 0;
    float nearestStepLocationForDestination = 0;
    float stepperLocationWithoutExtraRotations = 0;

    void setup()
    {
    Serial.begin(9600);
    Ethernet.begin(mac, ip);
    Udp.begin(localPort);
    stepper.setMaxSpeed(16000);
    stepper.setAcceleration(4000);



    }
    void loop()
    {
    packetSize = Udp.parsePacket();
    if (packetSize > 0)
    {
    Udp.read(packetBuffer, UDP_TX_PACKET_MAX_SIZE);
    convertedUdpValue = atoi(packetBuffer); //convert the packetBuffer char to a usable integer

    //Get a positive or negative whole number representing how many times and which direction we have looped the motor
    currentStepperRotations = (int)(stepper.currentPosition() / stepsPerRevolution);

    //Set the desired location to include the current rotations
    desiredLocation = (convertedUdpValue - MidValue)*31.37 + (currentStepperRotations * stepsPerRevolution);
    //Serial.println(desiredLocation);
    //Check if it's closer for us to complete the stepper circle and continue
    //from there than just moving directly to the point based on a zero origin
    stepperLocationWithoutExtraRotations = stepper.currentPosition() - (currentStepperRotations * stepsPerRevolution);

    if(abs(stepper.currentPosition() - desiredLocation) > (stepsPerRevolution/2))
    {
    //If we are in here, it means it's closer to loop around.
    //Now we need to figure out which direction to loop around
    if(stepper.currentPosition() - desiredLocation > 0)

    {
    //Continue onto the next positive rotation
    currentStepperRotations++;
    stepper.moveTo(desiredLocation);
    }
    if(stepper.currentPosition() - desiredLocation < 0)
    {
    //Go back a revolution
    currentStepperRotations--;
    stepper.moveTo(desiredLocation);
    }
    }
    //Take the rotations into account and reassign the desiredLocation
    desiredLocation = (convertedUdpValue - MidValue)*31.37 + (currentStepperRotations * stepsPerRevolution);

    delay (1);
    Serial.println(desiredLocation);
    stepper.moveTo(desiredLocation);
    //stepper.setMaxSpeed(16000); // tried this did not work
    //stepper.setAcceleration(4000);
    stepper.run();


    }

    memset(packetBuffer, 0, UDP_TX_PACKET_MAX_SIZE); // if i commet out this line gives me strange numbers
    }

    Thank you so much in taking time to help me
  8. armpit

    armpit Active Member

    Joined:
    Jan 7, 2016
    Messages:
    128
    Occupation:
    Software Engineer
    Location:
    SC, USA
    Balance:
    - 8Coins
    Ratings:
    +132 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    In the code you posted back, you have way more calls to stepper.moveTo() than I have in the loop I created for you, you do not need this call inside the conditionals where the currentStepperRotations is being incremented or decrimented, especially since it isn't actually giving it the correct value.
    You only need this call to happen once, the area after your delay(1) is correct for this call, after the desiredLocation has taken the recalculated stepper rotations into account.

    That is not the issue with your motor speeds though, I did misunderstand the documentation around the moveTo function, so it does require the max speed and acceleration to be set every time moveto is called as well as requiring the call to stepper.run() which you added, but this stepper.run needs to be moved outside of the udp parsing area of the loop.

    Try replacing your loop exactly with the following loop. If there are issues when using this exact code, feel free to message me directly and we can work through them. (I edited this code slightly after the initial reply, so make sure you're grabbing from here and not the email notification)
    Note that the delay(1) you had in there has been commented out, I think this was also contributing to causing the steps to run slower than they should, but the main thing is the stepper.run being relocated outside the udp conditional and the speed and accelleration being set after the moveto is called.

    Code:
    void loop()
    {
        packetSize = Udp.parsePacket();
        if (packetSize > 0)
        {
            Udp.read(packetBuffer, UDP_TX_PACKET_MAX_SIZE);
            convertedUdpValue = atoi(packetBuffer); //convert the packetBuffer char to a usable integer
    
            //Get a positive or negative whole number representing how many times and which direction we have looped the motor
            currentStepperRotations = (int)(stepper.currentPosition() / stepsPerRevolution);
    
            //Set the desired location to include the current rotations
            desiredLocation = (convertedUdpValue - MidValue)*31.37 + (currentStepperRotations * stepsPerRevolution);
            //Serial.println(desiredLocation);
            //Check if it's closer for us to complete the stepper circle and continue
            //from there than just moving directly to the point based on a zero origin
            stepperLocationWithoutExtraRotations = stepper.currentPosition() - (currentStepperRotations * stepsPerRevolution);
    
            if(abs(stepper.currentPosition() - desiredLocation) > (stepsPerRevolution/2))
            {
                //If we are in here, it means it's closer to loop around.
                //Now we need to figure out which direction to loop around
                if(stepper.currentPosition() - desiredLocation > 0)
                {
                    //Continue onto the next positive rotation
                    currentStepperRotations++;
                }
                if(stepper.currentPosition() - desiredLocation < 0)
                {
                //Go back a revolution
                    currentStepperRotations--;
                }
            }
            //Take the rotations into account and reassign the desiredLocation
            desiredLocation = (convertedUdpValue - MidValue)*31.37 + (currentStepperRotations * stepsPerRevolution);
    
            //I am commenting out this delay call, this might be causing issues with motor speeds.
            //delay (1);
    
            Serial.println(desiredLocation);
            stepper.moveTo(desiredLocation);
            stepper.setMaxSpeed(8000);
            stepper.setAcceleration(4000);
        }
    
        //This call is moved outside of the udp parse conditional, we want the stepper to continue
        //moving to the last issued location even if there haven't been any new packets received.
        stepper.run();
    
        memset(packetBuffer, 0, UDP_TX_PACKET_MAX_SIZE); // if i commet out this line gives me strange numbers
    }
    

    As far as this issue, it's going to be a challenge to know which direction the motor should move if you also want to allow it to take the shortest path by looping. We have to figure out how to know when it should loop for shortest path or when it should take the longer path to maintain the desired direction.

    I don't know enough about the simtools output to know how it handles 360 degree rotation. The solution I provided was only to make it so the motors always used the shortest path to get to the requested location.

    If a single motor sometimes need to take the shortest path but sometimes need to take a longer path to go the intended direction of rotation, that makes things harder and I'll have to think about how we can solve this.

    It's possible that changing the threshold to something like 3/4 rotation instead of 1/2 rotation will make this work more as you want.
    You can try messing with the line
    Code:
    if(abs(stepper.currentPosition() - desiredLocation) > (stepsPerRevolution/2))
    by changing it to something like this to change the threshold to 3/4 rotation instead of 1/2
    Code:
    if(abs(stepper.currentPosition() - desiredLocation) > 3*(stepsPerRevolution/4))
    • Like Like x 1
    • Informative Informative x 1
    Last edited: Jan 2, 2018
  9. Anguspogo

    Anguspogo New Member

    Joined:
    Jan 28, 2014
    Messages:
    9
    Balance:
    406Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    AC motor, SimAxe, Arduino, 4DOF
    Thank you Thank you Thank you
    IT WORKS
    Have to do some tests with the game running (falcon 4) but sir you are a hero
    Now i will go buy some steel to make a frame to see if the stepper motor is strong enough to propel me and a computer and monitor around and around
    thank you again
    i am still dancing with joy
    I will post pictures and things as i start to build
    • Like Like x 1
    • Funny Funny x 1
    • Winner Winner x 1
  10. armpit

    armpit Active Member

    Joined:
    Jan 7, 2016
    Messages:
    128
    Occupation:
    Software Engineer
    Location:
    SC, USA
    Balance:
    - 8Coins
    Ratings:
    +132 / 0 / -0
    My Motion Simulator:
    2DOF, DC motor, Arduino
    Great to hear! I did a little dance in my cubicle at work too!
    • Like Like x 2
  11. Anguspogo

    Anguspogo New Member

    Joined:
    Jan 28, 2014
    Messages:
    9
    Balance:
    406Coins
    Ratings:
    +14 / 0 / -0
    My Motion Simulator:
    AC motor, SimAxe, Arduino, 4DOF
    I am still dancing
    it works with the game too, did lots of roles and the motor was about a 10th of a second behind
    Mr Armpit SIR you have made my year and it's only just begun
    Thank you sir
    • Friendly Friendly x 2
    • Like Like x 1
  12. Trigen

    Trigen Active Member

    Joined:
    Nov 25, 2018
    Messages:
    472
    Balance:
    2,826Coins
    Ratings:
    +176 / 1 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, Arduino
    Could you post the final code for the stepper motors?